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

  1. set a [string repeat X 1000]
  2. puts [time {set XXX [string repeat $a 1500]} 100]
  3. puts [time {set XXX [string repeat $a 1500]; unset XXX} 100]
  4. puts [time {set XXX [string repeat $a 2500]} 100]
  5. puts [time {set XXX [string repeat $a 2500]; unset XXX} 100]
  6. puts [time {set XXX [string repeat $a 4500]} 100]
  7. puts [time {set XXX [string repeat $a 4500]; unset XXX} 100]
  8.  

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