| Kaitzschu 2005-10-30, 7:56 am |
| On Sun, 30 Oct 2005, Uwe Klein wrote:
> Kaitzschu wrote:
> alot
>
> on compress:
> with no [eval] it is slightly faster 184 -> 144 usec
> bracing of [expr] 144 -> 44 usec
>
> proc count_compress2 list {
....
> }
- Conclusion : 704.59 / 1118.84 | 1159.67 / 1277.18 | 2373.02 / 289.56
+ Conclusion : 702.49 / 1100.72 | 1134.75 / 1268.48 | 1263.85 / 297.66
As [expr] was already braced, that not-eval seems to have somewhat greater
overall impact than meager 20 percent, nearly 50 or so. Impressive still,
but I can top that.
Let's imagine you wrote your [switch] like this
switch -- [expr { $tok - $curr } ] {
0 {
# puts stderr duplicate:$tok
} 1 {
# puts stderr next:$tok
set end $tok
incr curr
} default {
# puts stderr "step:$curr - $tok"
if {$start != $end} {
lappend res $start - $end
} else {
lappend res $end
}
set curr $tok
set start $tok
set end $tok
}
}
and I re-run the timings. What would happen? The same thing that'd happen
with [uplevel], no need to look for options gives us (this time meaning
just me and Suchenwi) a major whoopass:
Length | CR% | Kaitzschu c/e | Suchenwi c/e | Uwe c/e
-------+--------+-------------------+-------------------+------------------
15000 | 99.99 | 15.06 / 7.04 | 32.76 / 5.84 | 12.14 / 10.15
30000 | 100.00 | 31.29 / 14.47 | 61.56 / 11.83 | 24.41 / 20.40
15001 | 89.93 | 16.78 / 14.94 | 43.90 / 33.17 | 13.91 / 10.37
30000 | 90.02 | 35.63 / 30.73 | 89.66 / 68.03 | 30.31 / 22.70
15000 | 74.78 | 20.38 / 25.80 | 53.14 / 58.27 | 16.90 / 10.75
30000 | 74.98 | 42.60 / 52.94 | 105.49 / 117.60 | 34.15 / 21.48
15001 | 66.86 | 22.95 / 31.89 | 54.02 / 65.31 | 17.98 / 11.38
30001 | 67.21 | 49.30 / 64.47 | 107.79 / 131.24 | 36.53 / 22.93
15000 | 50.42 | 26.65 / 43.09 | 50.28 / 67.22 | 20.03 / 12.58
30000 | 49.94 | 57.26 / 88.41 | 99.04 / 134.38 | 40.37 / 23.75
15000 | 32.99 | 29.19 / 53.22 | 39.87 / 56.86 | 21.19 / 12.07
30000 | 33.04 | 62.02 / 108.73 | 82.80 / 116.22 | 41.51 / 24.15
15000 | 20.33 | 31.11 / 59.45 | 35.56 / 49.02 | 20.94 / 12.30
30000 | 19.99 | 64.65 / 121.57 | 70.23 / 98.31 | 41.48 / 24.42
15000 | 11.33 | 32.51 / 63.42 | 33.54 / 43.80 | 21.03 / 12.79
30000 | 10.88 | 65.74 / 130.13 | 64.81 / 87.85 | 40.92 / 24.64
15000 | 7.31 | 33.61 / 65.62 | 32.31 / 42.29 | 20.90 / 13.16
30000 | 7.07 | 67.19 / 134.28 | 63.90 / 85.78 | 40.82 / 25.16
----------------+-------------------+-------------------+------------------
Conclusion : 703.89 / 1110.17 | 1120.65 / 1272.99 | 495.50 / 315.18
322.656u 0.672s 5:23.37 99.9% 0+0k 0+0io 0pf+0w
So now I'll go to my bed and cry me a river, maybe later I build a bridge
and get over it. But not today, not.
> shove all this into the wiki?
Feel free if you want to, but I'm too shy to post there myself. My stomach
is twisting just for the idea. Or maybe these latest results just aren't
digesting at all :)
--
-Kaitzschu
s="TCL ";while true;do echo -en "\r$s";s=${s:1:${#s}}${s:0:1};sleep .1;done
|