Ticket #39 (closed defect: wontfix)
Bad list constructor code
| Reported by: | gfurnish | Owned by: | somebody |
|---|---|---|---|
| Priority: | trivial | Milestone: | 0.10 |
| Component: | Optimization | Keywords: | |
| Cc: |
Description
Consider:
405: _operands = list()
__pyx_1 = PyObject_Call(((PyObject*)&PyList_Type), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1;}
Py_DECREF(__pyx_v__operands);
__pyx_v__operands = __pyx_1;
__pyx_1 = 0;
This is wildly inefficient compared to a single PyList?_New(0) call.
Change History
Note: See
TracTickets for help on using
tickets.
