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

  1. chat-transcript ... in the hope it isn't missed...
  3. strange, for my procx and some testprocxedures, trunk seems slower than tcl8.6.5 from ubuntu... a one liner procedure:
  5. 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 }
  7. 1.4 msec/it with trunk, 0.87 with 8.6.5
  9. 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
  11. (FWIW) 1000000 iterations, timings have been run a couple of times each and some median used.


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.