Posted to tcl by evilotto at Tue Mar 07 00:41:43 GMT 2017view raw

  1. % set l [lrepeat 100000 x]; time {set l [lreplace $l[set l {}] 1 1 n]} 1000
  2. 1195.011 microseconds per iteration
  3. % set E 1
  4. 1
  5. % set l [lrepeat 100000 x]; time {set l [lreplace $l[set l {}] $E $E n]} 1000
  6. 1.968 microseconds per iteration
  7.  
  8.