Posted to tcl by kbk at Sun Nov 21 02:26:52 GMT 2010view raw
- $ ./tcltest
- % set i 0
- 0
- % time {set x [expr {[incr i] * 1e-3}]a} 1000000
- 3.281527 microseconds per iteration
- % set tcl_precision 17
- 17
- % set i 0
- 0
- % time {set x [expr {[incr i] * 1e-3}]a} 1000000
- 5.1265559999999999 microseconds per iteration
- % set tcl_precision 12
- 12
- % set i 0
- 0
- % time {set x [expr {[incr i] * 1e-3}]a} 1000000
- 5.933869 microseconds per iteration
- % exit
- $ tclsh8.5
- % set i 0
- 0
- % time {set x [expr {[incr i] * 1e-3}]a} 1000000; # yeah, 8.5 is horrible
- 16.237774 microseconds per iteration
- % set tcl_precision 17
- 17
- % set i 0
- 0
- % time {set x [expr {[incr i] * 1e-3}]a} 1000000
- 4.1925800000000004 microseconds per iteration
- % set tcl_precision 12
- 12
- % set i 0
- 0
- % time {set x [expr {[incr i] * 1e-3}]a} 1000000
- 3.858285 microseconds per iteration
- % exit
- kennykb@kenny-family-server:~/SourceForge/tcl/kaboodle$