[Metakit] Performance comparison Q

Jean-Claude Wippler jcw at equi4.com
Mon May 9 19:30:58 CEST 2005


jyl at mod3.net wrote:

> If you have the data in an array

No, list (Tcl arrays are hash tables, I am interested in vector access).

> % time {for {set i 0} {$i < 49999} {incr i} {incr sum [lindex $data  
> $i]}} 10
> 198283 microseconds per iteration

Fascinating.  I dismissed this one and used foreach, which is slower.
Still under 1% of C.

-jcw



More information about the Metakit mailing list