Posted to tcl by evilotto at Wed Mar 26 21:48:06 GMT 2014view pretty

set a [string repeat X 1000]
puts [time {set XXX [string repeat $a 1500]} 100]
puts [time {set XXX [string repeat $a 1500]; unset XXX} 100]
puts [time {set XXX [string repeat $a 2500]} 100]
puts [time {set XXX [string repeat $a 2500]; unset XXX} 100]
puts [time {set XXX [string repeat $a 4500]} 100]
puts [time {set XXX [string repeat $a 4500]; unset XXX} 100]

Comments

Posted by evilotto at Wed Mar 26 21:48:49 GMT 2014 [text] [code]

The timing results I get are pretty stable; here's a sample: 721.72 microseconds per iteration 727.38 microseconds per iteration 1339.03 microseconds per iteration 1203.28 microseconds per iteration 3136.95 microseconds per iteration 2290.16 microseconds per iteration