Posted to tcl by evilotto at Thu Oct 10 17:06:26 GMT 2013view raw

  1. % set l [lrepeat 10000 x] ; llength $l
  2. 10000
  3. % time {set l1 $l; unset l1} 1000
  4. 0.768 microseconds per iteration
  5. % time {set l1 $l} 1000
  6. 0.409 microseconds per iteration
  7. % time {lappend l1 x} 1000
  8. 0.561 microseconds per iteration
  9. % time {set l1 $l; lappend l1 x} 1000
  10. 37.043 microseconds per iteration
  11. %