Posted to tcl by avl at Mon May 29 22:35:26 GMT 2017view pretty

chat-transcript ... in the hope it isn't missed...

strange, for my procx and some testprocxedures, trunk seems slower than tcl8.6.5 from ubuntu...   a one liner procedure: 

  proc foo {a &args b} {upvar 1 [set &a $a][unset a] a [set &b $b][unset b] b;set args ${&args}[unset &args]; list ${a} -- $args -- $b }

1.4 msec/it with trunk, 0.87 with 8.6.5

Seems like either the unset or the ${&args}[unset &args] idiom has become more expensive.  Removing just the [unset &args] saves ~0.22msec in trunk, but only 0.06msec on 8.6.5

(FWIW)  1000000 iterations, timings have been run a couple of times each and some median used.

Comments

Posted by avl at Mon May 29 22:42:19 GMT 2017 [text] [code]

Btw., further test makes it seem the concatenation is the real problem. once the unset is no longer concatenated, adding or removing it makes roughly equal difference in trunk and 8.6.5.

Posted by avl at Mon May 29 22:51:02 GMT 2017 [text] [code]

with 8.6.5, the difference between "...$b; unset b" and "...$b[unset b]" is below noise level, whereas in trunk the difference accounts for 0.16 msec/it.