Posted to tcl by aspect at Tue Jul 02 00:06:08 GMT 2013view raw

  1. tclsh8.6 [~]dict set dict 5 5
  2. 5 5
  3. tclsh8.6 [~]set arr(5) 5
  4. 5
  5. tclsh8.6 [~]time {info exists arr(5)} 10000000
  6. 0.1506702 microseconds per iteration
  7. tclsh8.6 [~]time {dict exists $dict 5} 10000000
  8. 0.1621209 microseconds per iteration
  9. tclsh8.6 [~]time {info exists arr(4)} 10000000
  10. 0.1820209 microseconds per iteration
  11. tclsh8.6 [~]time {dict exists $dict 4} 10000000
  12. 0.1612164 microseconds per iteration
  13. tclsh8.6 [~]
  14.  

Comments

Posted by aspect at Tue Jul 02 00:27:49 GMT 2013 [text] [code]

tclsh8.5 [~]info pa 8.5.11 tclsh8.5 [~]dict set dict 5 5 5 5 tclsh8.5 [~]set arr(5) 5 5 tclsh8.5 [~]time {info exists arr(5)} 10000000 0.1359568 microseconds per iteration tclsh8.5 [~]time {dict exists $dict 5} 10000000 0.456245 microseconds per iteration tclsh8.5 [~]time {info exists arr(4)} 10000000 0.1652426 microseconds per iteration tclsh8.5 [~]time {dict exists $dict 4} 10000000 0.446756 microseconds per iteration