| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| int tuple_length = sym_tuple_length(arg); | ||
| if (tuple_length >= 0) { | ||
| PyObject *temp = PyLong_FromLong(tuple_length); | ||
| if (temp == NULL) { | ||
| goto error; | ||
| } | ||
| if (_Py_IsImmortal(temp)) { | ||
| REPLACE_OP(this_instr, _POP_CALL_ONE_LOAD_CONST_INLINE_BORROW, | ||
| 0, (uintptr_t)temp); | ||
| } | ||
| res = sym_new_const(ctx, temp); | ||
| Py_DECREF(temp); | ||
| } |
There was a problem hiding this comment.
This is basically copied from the recent _GET_LEN optimization
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good! I'll leave this for you to merge yourself. ;)
Sorry, something went wrong.
|
I'm planning to merge this once the tests pass :) |
Sorry, something went wrong.
…thon#135260) * Add news entry * Optimize _CALL_LEN * Simplify tests
…thon#135260) * Add news entry * Optimize _CALL_LEN * Simplify tests
…thon#135260) * Add news entry * Optimize _CALL_LEN * Simplify tests
| Back | FazBrowse Home | New Git URL |
This uses the same principle as #135194 to completely remove _CALL_LEN when the length is known.
I don't know how common it is to actually know the length exactly so please let me know if this is not worth it, but given that _CALL_LEN is the most common builtin call, it felt worth to optimize this case.