Re: Performance comparison Q
Bruce A.Johnson <[email protected]> Mon, 9 May 2005 12:38:28 -0400
| Newsgroups | gmane.comp.db.metakit |
|---|---|
| Message-ID | <[email protected]> |
Are you putting the Tcl test line inside a proc? Otherwise I don't think it will be compiled with the Tcl bytecode compiler. Bruce On May 9, 2005, at 12:30 PM, Jean-Claude Wippler wrote: > [email protected] 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 > > _____________________________________________ > Metakit mailing list - [email protected] > http://www.equi4.com/mailman/listinfo/metakit > _____________________________________________ Metakit mailing list - [email protected] http://www.equi4.com/mailman/listinfo/metakit