Posted to tcl by dbohdan at Fri Jan 01 19:06:07 GMT 2016view raw

  1. $ cat append.tcl
  2. puts [time {set a {}; for {set i 0} {$i < 10000000} {incr i} { append a @ }} 10]
  3. $ tclsh append.tcl
  4. 7152838.1 microseconds per iteration
  5. $ jimsh append.tcl
  6. 2172198 microseconds per iteration
  7.  

Comments

Posted by miguel at Fri Jan 01 23:46:36 GMT 2016 [text] [code]

Compilation cost? Try the same with 1000 iterations instead of 10 (maybe reducing the iter number in the timed loop)