On Thursday, June 7, 2018 at 10:07:19 AM UTC-7, Rich wrote:
> I don't understand the variance, but the regex version is faster, or at
> least equal, to the code version over these runs.
*Without* the error checking in splitOnWhiteSpace,
increased time loop to 1000 from 100.
I am also getting a lot of variance. I was getting more variance
for the regex test when the timing loop was set to 100. Strange.
Hard to tell which is better with that variance in timing.
My system is fairly quiescent, but I didn't shut down the browser, etc.
Tcl code:
3.189 microseconds per iteration
Regex engine:
4.7 microseconds per iteration
Tcl code:
4.114 microseconds per iteration
Regex engine:
4.634 microseconds per iteration
Tcl code:
2.889 microseconds per iteration
Regex engine:
4.989 microseconds per iteration
Tcl code:
5.118 microseconds per iteration
Regex engine:
5.448 microseconds per iteration
Tcl code:
5.019 microseconds per iteration
Regex engine:
4.753 microseconds per iteration
Tcl code:
3.096 microseconds per iteration
Regex engine:
5.149 microseconds per iteration
Tcl code:
2.646 microseconds per iteration
Regex engine:
5.367 microseconds per iteration
Tcl code:
5.123 microseconds per iteration
Regex engine:
5.102 microseconds per iteration
Tcl code:
4.286 microseconds per iteration
Regex engine:
4.755 microseconds per iteration