Demur Rumed added the comment:

The simplest perf fix is to first use BUILD_TUPLE instead of BUILD_LIST

timeit 'x=1;(x,x,x)'
0.36 usec per loop

timeit 'x=1;[x,x,x]'
0.425 usec per loop

Introducing a new opcode BUILD_STRING to inline PyTuple_New + PyUnicode_Join to 
replace BUILD_TUPLE + CALL_FUNCTION should benchmark against BUILD_TUPLE 
version, not BUILD_LIST + CALL_FUNCTION

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27078>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to