Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#36 closed defect (fixed)

Bad code generation

Reported by: gfurnish Owned by: somebody
Priority: major Milestone: 0.9.8.1
Component: Optimization Keywords:
Cc:

Description

 147:             x = <TypedSymbolicExpression>PyList_GET_ITEM(operands, i)

      Py_INCREF(((PyObject *)((struct __pyx_obj_4sage_9symbolics_10expression_TypedSymbolicExpression *)PyList_GET_ITEM(__pyx_v_operands, __pyx_v_i))));
      Py_DECREF(((PyObject *)__pyx_v_x));
      __pyx_v_x = ((struct __pyx_obj_4sage_9symbolics_10expression_TypedSymbolicExpression *)PyList_GET_ITEM(__pyx_v_operands, __pyx_v_i));

This should use a temporary instead of calling the thing being casted twice.

Change History (2)

comment:1 Changed 6 years ago by robertwb

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 6 years ago by robertwb

  • Milestone set to 0.9.8.1
Note: See TracTickets for help on using tickets.