Commit 248e8d06 authored by Stefan Behnel's avatar Stefan Behnel

use in-place multiplication for newly created sequences

parent ae1bd00b
...@@ -4464,7 +4464,7 @@ class SequenceNode(ExprNode): ...@@ -4464,7 +4464,7 @@ class SequenceNode(ExprNode):
#code.funcstate.release_temp(counter) #code.funcstate.release_temp(counter)
code.putln('}') code.putln('}')
elif py_multiply and not plain: elif py_multiply and not plain:
code.putln('{ PyObject* %s = PyNumber_Multiply(%s, %s); %s' % ( code.putln('{ PyObject* %s = PyNumber_InPlaceMultiply(%s, %s); %s' % (
Naming.quick_temp_cname, target, self.mult_factor.py_result(), Naming.quick_temp_cname, target, self.mult_factor.py_result(),
code.error_goto_if_null(Naming.quick_temp_cname, self.pos) code.error_goto_if_null(Naming.quick_temp_cname, self.pos)
)) ))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment