Posted to tcl by miguel at Sat Jan 09 18:35:59 GMT 2016view raw

  1. This is a comment to dbohdan's http://paste.tclers.tk/-New/3711, which for some reason I could not attach there.
  2.  
  3.  
  4. % puts [time {set a {}; for {set i 0} {$i < 100000} {incr i} {append a @}} 100]
  5. 28260.06 microseconds per iteration
  6. % set l [list {} {set a {}; for {set i 0} {$i < 100000} {incr i} {append a @}}]
  7. {} {set a {}; for {set i 0} {$i < 100000} {incr i} {append a @}}
  8. % puts [time {apply $l} 100]
  9. 6265.57 microseconds per iteration
  10.