Version 26 of Tcl Benchmarks

Updated 2007-11-19 09:59:10 by dkf

Jeffrey Hobbs: There have been discussions about the changing relative speed of Tcl over the years (primarily rotating around the addition of the byte-code compiler - faster, but then also the changes to support i18n - slower).

I created the tclbench [L1 ] application to get a better understanding of what has truly happened to performance over the years, with the forward looking view of finding the pain points and fixing them. Anyone can get tclbench from CVS [L2 ] to do relative benchmarks themselves, but below I've posted the results from a full run over the benchmark suite. All builds represent the final code of that version.

A few have noted that these numbers aren't the easiest to read overall, which I can agree with. Take a look at the Tcl Normalized Benchmarks that set 8.4 as a norm of 1.0 to compare against. For those looking for more complete version-by-version comparisons, see Tcl Extended Benchmarks.

If you've got BLT handy, then here is a little code for Plotting Tcl Benchmarks.

The speed enhancements in 8.4 are primarily achieved by work done by myself and Eric Melski at Ajuba and continued at ActiveState. Addition optimizations are also done by Miguel Sofer. Additional major enhancements in 8.5 done by JH, Miguel Sofer and Donal Fellows.

For those interested in the use of threads for concurrent processing, please see the Tcl Benchmarks with Threads.

The numbers are microseconds, but you should only look at them relative to each other. Lower is better. There is some fluctuation expected as Tcl's 'time' does wall timing, not true cpu time. In any case, these were done on a P4 1.9ghz with 1GB physmem running SuSE 9.2. All interpreters were compiled static with no threads using gcc 3.3.4 (pre 3.3.5 20040809) with -O2 (no -mcpu modifiers).


 TCL_INTERP: 1:8.5b2.1 2:8.4.17 3:8.3.5 4:8.2.3 5:8.0.5 6:7.6p2
 STARTED 2007-11-16 16:57:20 (runbench.tcl v1.20)
 Benchmark 1:8.5b2.1 /home/jeffh/install/linux-ix86/bin/canon8.5
 abbccdeeeffghkllmmmmnpprrssstuvw 00:02:10 elapsed
 124908 milliseconds
 Benchmark 2:8.4.17 /home/jeffh/install/linux-ix86/bin/canon8.4
 abbccdeeeffghkllmmmmnpprrssstuvw 00:02:26 elapsed
 141025 milliseconds
 Benchmark 3:8.3.5 /home/jeffh/install/linux-ix86/bin/canon8.3
 abbccdeeeffghkllmmmmnpprrssstuvw 00:04:07 elapsed
 243033 milliseconds
 Benchmark 4:8.2.3 /home/jeffh/install/linux-ix86/bin/canon8.2
 abbccdeeeffghkllmmmmnpprrssstuvw 00:04:01 elapsed
 239295 milliseconds
 Benchmark 5:8.0.5 /home/jeffh/install/linux-ix86/bin/canon8.0
 abbccdeeeffghkllmmmmnpprrssstuvw 00:03:02 elapsed
 171770 milliseconds
 Benchmark 6:7.6p2 /home/jeffh/install/linux-ix86/bin/canon7.6
 abbccdeeeffghkllmmmmnpprrssstuvw 00:07:53 elapsed
 460698 milliseconds
000VERSIONS:1:8.5b2.12:8.4.173:8.3.54:8.2.35:8.0.56:7.6p2
001ARRAY genKeys 50252.05178.86364.00332.00303.00433.00
002ARRAY genKeys 5002173.582483.602067.001826.001632.002842.00
003ARRAY makeHash 500 5061143.0858178.5058447.0074547.0067374.0080541.00
004BASE64 decode 10102.48120.85150.00149.00126.00-=-
005BASE64 decode 100795.48960.671182.001223.001049.00-=-
006BASE64 decode 10007690.509134.2011354.0011880.0010303.00-=-
007BASE64 decode 1000077133.8090533.90113801.0119634.0103907.0-=-
008BASE64 decode2 10100.63119.78147.00142.00123.00-=-
009BASE64 decode2 100783.35942.381162.001188.001041.00-=-
010BASE64 decode2 10007663.858970.6511166.0011775.0010113.00-=-
011BASE64 decode2 1000075982.4089063.10110074.0117046.0102071.0-=-
012BASE64 decode3 1056.3561.3288.0086.0073.00-=-
013BASE64 decode3 100378.35427.18679.00668.00583.00-=-
014BASE64 decode3 10003470.753957.756396.006463.005726.00-=-
015BASE64 decode3 1000034249.6039701.6064369.0064817.0057214.00-=-
016BASE64 encode 1067.7769.98112.00114.00106.00-=-
017BASE64 encode 100515.50533.52829.00848.00835.00-=-
018BASE64 encode 10004912.704990.207977.008149.008037.00-=-
019BASE64 encode 1000048931.8049657.9080006.0085374.0080553.00-=-
020BASE64 encode2 1054.1365.8598.0095.00113.00-=-
021BASE64 encode2 100380.82471.32807.00806.001078.00-=-
022BASE64 encode2 10003637.854541.207933.007856.0010729.00-=-
023BASE64 encode2 1000036233.1045311.0078686.0081967.00107432.0-=-
024BASE64 encode3 1043.1045.3054.0054.0047.00-=-
025BASE64 encode3 100185.60243.70392.00371.00323.00-=-
026BASE64 encode3 10001617.502041.653635.003439.003101.00-=-
027BASE64 encode3 1000015329.1020007.9036180.0034327.0030852.00-=-
028BIN bitset-v1 1000 chars3735.164377.274868.004870.004257.00-=-
029BIN bitset-v1 5000 chars17019.5520216.0022714.0025399.0021568.00-=-
030BIN bitset-v1 10000 chars33824.3240376.6044928.0048845.0043003.00-=-
031BIN bitset-v2 1000 chars2352.332436.362913.002685.002544.00-=-
032BIN bitset-v2 5000 chars10945.5411961.4014774.0013512.0012769.00-=-
033BIN bitset-v2 10000 chars21843.0523771.8029556.0027374.0025721.00-=-
034BIN bitset-v3 1000 chars864.54841.321653.001560.001306.00-=-
035BIN bitset-v3 5000 chars3977.533772.618587.007899.006850.00-=-
036BIN bitset-v3 10000 chars7954.257666.5217431.0016007.0013850.00-=-
037BIN c scan, 1000b276.49273.96126.00128.00101.00-=-
038BIN c scan, 5000b910.091026.88662.00628.00502.00-=-
039BIN c scan, 10000b1789.581674.191522.001512.001281.00-=-
040BIN chars, 10000b7989.217868.9617561.0016686.0014218.00-=-
041BIN u char, 10000b1695.28-=--=--=--=--=-
042CATCH error, complex18.349.369.008.006.008.00
043CATCH no catch used5.933.603.004.002.004.00
044CATCH return error17.889.989.007.007.009.00
045CATCH return except4.793.313.003.002.004.00
046CATCH return ok5.893.403.002.002.005.00
047DATA access in a list183.78258.81636.00604.00567.0012342.00
048DATA access in an array525.06397.54672.00663.00607.001781.00
049DATA create in a list212.94209.58739.00646.00656.001676.00
050DATA create in an array826.58693.33927.00916.001226.002098.00
051ENC iso2022-jp, gets208.508455.802844.002893.00-=--=-
052ENC iso2022-jp, read163.308440.132791.002765.00-=--=-
053ENC iso2022-jp, read & size187.678508.002756.002794.00-=--=-
054ENC iso8859-2, gets185.43293.83194.00172.00-=--=-
055ENC iso8859-2, read156.87253.53146.00135.00-=--=-
056ENC iso8859-2, read & size168.53268.67147.00145.00-=--=-
057EVAL cmd and mixed lists666.82707.65550.001545.001108.00165.00
058EVAL cmd eval as list3.863.224.007.006.004.00
059EVAL cmd eval as string9.906.806.007.006.003.00
060EVAL cmd eval in list obj var3.604.533.008.007.004.00
061EVAL list cmd and mixed lists667.38705.38573.001554.001122.00169.00
062EVAL list cmd and pure lists63.2347.5537.001566.001101.00161.00
063EXPR $a != $b int2.132.462.002.002.0010.00
064EXPR $a != $b str (!= len)4.705.215.005.005.0015.00
065EXPR $a != $b str (== len)4.706.075.006.005.0014.00
066EXPR $a == $b int2.122.532.002.002.0010.00
067EXPR $a == $b str (!= len)4.785.056.005.005.0014.00
068EXPR $a == $b str (== len)6.037.327.005.006.0015.00
069EXPR braced5.884.636.004.004.0022.00
070EXPR fifty operands7.597.819.009.007.0032.00
071EXPR incr with expr1.691.901.001.001.003.00
072EXPR incr with incr1.581.532.001.001.002.00
073EXPR inline6.396.105.005.004.0010.00
074EXPR one operand1.601.721.001.001.002.00
075EXPR ten operands2.662.903.003.002.008.00
076EXPR unbraced69.5536.8331.0027.0021.0020.00
077EXPR unbraced long155.66224.55188.00187.0081.0065.00
078FCOPY binary: 160K2389.032553.492514.002528.00-=--=-
079FCOPY encoding: 160K6878.376878.392503.002531.00-=--=-
080FCOPY std: 160K2379.632541.082502.002534.003064.002963.00
081FILE exec interp7693.606476.976084.005195.005701.003084.00
082FILE exec interp: pkg require25372.0317241.5713780.0012294.007878.004401.00
083FILE exists tmpfile (obj)4.124.424.004.007.003.00
084FILE exists ~3.303.6991.0094.0011.006.00
085FILE exists! tmpfile (obj)3.634.014.004.003.003.00
086FILE exists! tmpfile (str)9.8922.435.004.003.003.00
087FILE glob tmpdir (60 entries)129.77158.89121.00132.0097.0093.00
088FILE glob / all subcommands6435.146748.526326.006551.005169.004951.00
089FILE glob / atime1164.881152.97472.00493.00374.00451.00
090FILE glob / attributes2311.302084.411375.001553.001052.00-=-
091FILE glob / dirname204.06619.24286.00353.00290.00308.00
092FILE glob / executable1147.991145.89428.00477.00361.00394.00
093FILE glob / exists1145.001144.13422.00479.00365.00397.00
094FILE glob / extension228.89345.19203.00262.00215.00237.00
095FILE glob / isdirectory1164.851150.92435.00491.00375.00397.00
096FILE glob / isfile1158.661152.73435.00491.00375.00399.00
097FILE glob / mtime1159.961168.77437.00496.00379.00447.00
098FILE glob / owned1177.061181.34465.00512.00399.00422.00
099FILE glob / readable1143.461140.75418.00482.00369.00391.00
100FILE glob / rootname245.09342.52199.00266.00218.00236.00
101FILE glob / size1170.911161.85433.00489.00380.00440.00
102FILE glob / tail202.49487.58262.00324.00272.00276.00
103FILE glob / writable1153.921165.66423.00491.00367.00388.00
104FILE recurse / -dir4684.335865.883848.004191.003951.003910.00
105FILE recurse / cd5132.679150.693620.003776.003751.003546.00
106GCCont_cpb::cGCC 5087.1984.19200.00195.00146.00-=-
107GCCont_cpb::cGCC 500492.97419.341299.001331.001122.00-=-
108GCCont_cpb::cGCC 50004543.443669.4811852.0012513.0010697.00-=-
109GCCont_cpbre1::cGCC 50116.56121.66122.00-=--=--=-
110GCCont_cpbre1::cGCC 500795.98823.52745.00-=--=--=-
111GCCont_cpbre1::cGCC 50007679.767766.046928.00-=--=--=-
112GCCont_cpbre2::cGCC 5087.2893.9190.00-=--=--=-
113GCCont_cpbre2::cGCC 500648.99707.75617.00-=--=--=-
114GCCont_cpbre2::cGCC 50006239.766871.625998.00-=--=--=-
115GCCont_cpbrs2::cGCC 5031.5636.40100.00101.00-=--=-
116GCCont_cpbrs2::cGCC 500128.34135.15743.00760.00-=--=-
117GCCont_cpbrs2::cGCC 50001064.341094.207048.007376.00-=--=-
118GCCont_cpbrs::cGCC1 5051.8356.45155.00159.0084.00-=-
119GCCont_cpbrs::cGCC1 500160.72164.97883.00910.00193.00-=-
120GCCont_cpbrs::cGCC1 50001181.081185.707844.008208.001066.00-=-
121GCCont_cpbrs::cGCC2 5046.6251.33161.00164.0081.00-=-
122GCCont_cpbrs::cGCC2 500145.63152.76912.00941.00184.00-=-
123GCCont_cpbrs::cGCC2 50001073.501111.628259.008488.00959.00-=-
124GCCont_cpbrs_trap::cGCC 50101.08110.13106.00111.0066.00-=-
125GCCont_cpbrs_trap::cGCC 500707.94770.20692.00758.00410.00-=-
126GCCont_cpbrs_trap::cGCC 50006766.147276.966557.007171.003647.00-=-
127GCCont_expr::cGCC 5094.6586.3679.0078.00-=--=-
128GCCont_expr::cGCC 500427.721008.85972.00966.00-=--=-
129GCCont_expr::cGCC 50003806.9662513.6866655.0057723.00-=--=-
130GCCont_i::cGCC1 5067.45141.04169.00165.00126.00-=-
131GCCont_i::cGCC1 500532.821294.811535.001493.001276.00-=-
132GCCont_i::cGCC1 50005191.1212560.4214971.0014750.0012844.00-=-
133GCCont_i::cGCC2 5054.6053.3887.0096.0068.00-=-
134GCCont_i::cGCC2 500428.90400.02702.00782.00677.00-=-
135GCCont_i::cGCC2 50004166.383928.586940.007888.006883.00-=-
136GCCont_i::cGCC3 5049.4846.7878.0090.0062.00-=-
137GCCont_i::cGCC3 500374.11335.63630.00710.00618.00-=-
138GCCont_i::cGCC3 50003590.583240.106028.007204.006238.00-=-
139GCCont_r1::cGCC 5073.31163.68235.00211.00165.00-=-
140GCCont_r1::cGCC 500693.711601.452271.002015.001589.00-=-
141GCCont_r1::cGCC 50006894.2815781.6422669.0019903.0015760.00-=-
142GCCont_r2::cGCC 5066.21156.08184.00174.00135.00-=-
143GCCont_r2::cGCC 500570.321482.701663.001599.001314.00-=-
144GCCont_r2::cGCC 50005572.0013842.1216157.0016304.0013445.00-=-
145GCCont_r3::cGCC 5070.94155.71179.00179.00138.00-=-
146GCCont_r3::cGCC 500594.671410.481648.001619.001348.00-=-
147GCCont_r3::cGCC 50005812.4013827.0816140.0016124.0013303.00-=-
148GCCont_rsf1::cGCC 5063.2561.5087.00103.00-=--=-
149GCCont_rsf1::cGCC 500436.57394.38561.00776.00-=--=-
150GCCont_rsf1::cGCC 50004160.863676.485281.007667.00-=--=-
151GCCont_rsf2::cGCC1 5040.5241.7155.0067.00-=--=-
152GCCont_rsf2::cGCC1 500229.20206.86332.00426.00-=--=-
153GCCont_rsf2::cGCC1 50002008.561820.563053.004000.00-=--=-
154GCCont_rsf2::cGCC2 5036.4137.1644.0053.00-=--=-
155GCCont_rsf2::cGCC2 500214.82199.24301.00396.00-=--=-
156GCCont_rsf2::cGCC2 50001954.201739.042814.003756.00-=--=-
157GCCont_rsf3::cGCC 5037.3037.5944.0053.00-=--=-
158GCCont_rsf3::cGCC 500209.10197.52303.00396.00-=--=-
159GCCont_rsf3::cGCC 50001968.341742.862815.003781.00-=--=-
160GCCont_turing::cGCC 5025.3630.8340.0039.00-=--=-
161GCCont_turing::cGCC 500123.19129.82226.00230.00-=--=-
162GCCont_turing::cGCC 50001058.501119.982161.002173.00-=--=-
163HEAPSORT size 10110.39102.65133.00130.001419.00730.00
164HEAPSORT size 501015.22856.771090.001088.008298.005936.00
165HEAPSORT size 1002459.352106.162646.002618.0017276.0014031.00
166HEAPSORT2 size 1070.5194.68-=--=--=--=-
167HEAPSORT2 size 50574.28789.09-=--=--=--=-
168HEAPSORT2 size 1001400.571953.34-=--=--=--=-
169IF 1/0 check1.621.692.002.002.006.00
170IF else true al3.495.215.005.005.0013.00
171IF else true numeric2.342.673.003.003.0013.00
172IF elseif true al3.634.855.005.005.0013.00
173IF elseif true numeric2.914.104.003.004.0012.00
174IF if false al/al2.634.044.004.003.0010.00
175IF if false al/num2.783.293.003.003.0013.00
176IF if false num/num2.422.382.002.002.0010.00
177IF if true al2.673.054.003.003.0010.00
178IF if true al/al2.793.254.004.004.009.00
179IF if true num/num2.282.372.002.002.0010.00
180IF if true numeric2.422.412.002.002.0010.00
181IF multi 1st true2.262.472.002.002.0016.00
182IF multi 2nd true2.422.623.003.003.0017.00
183IF multi 9th true3.464.326.006.005.0033.00
184IF multi default true3.624.176.006.006.0032.00
185KLIST shuffle0 llength 111.5612.7220.0019.0017.008.0+
186KLIST shuffle0 llength 1040.2343.8376.0073.0070.008.0+
187KLIST shuffle0 llength 100342.54350.32595.00584.00508.008.0+
188KLIST shuffle0 llength 10003974.753914.396522.006177.005645.008.0+
189KLIST shuffle0 llength 1000092590.1095597.50113544.0113605.097221.00-=-
190KLIST shuffle1-s llength 19.8511.2415.0012.008.0048.00
191KLIST shuffle1-s llength 1054.7762.0592.0066.0061.00270.00
192KLIST shuffle1-s llength 1001038.021039.441353.00949.00889.004826.00
193KLIST shuffle1-s llength 100062326.1363734.1169550.0042538.0044752.00270762.0
194KLIST shuffle1a llength 112.0613.6715.0014.0010.0040.00
195KLIST shuffle1a llength 1071.9674.4782.0079.0072.00335.00
196KLIST shuffle1a llength 100693.90703.12760.00761.00680.006295.00
197KLIST shuffle1a llength 10006972.497103.258747.007748.006907.00330792.0
198KLIST shuffle1a llength 1000073891.9074916.4080355.0087676.0074751.00-=-
199KLIST shuffle2 llength 112.7411.9317.0015.0017.0044.00
200KLIST shuffle2 llength 1083.5460.6781.0077.00101.00267.00
201KLIST shuffle2 llength 100820.73566.22773.00701.00952.002494.00
202KLIST shuffle2 llength 10009231.486484.648247.007397.0010008.0025147.00
203KLIST shuffle2 llength 10000112880.281431.7098294.0092740.00119638.0-=-
204KLIST shuffle3 llength 19.9010.7314.0014.0010.0030.00
205KLIST shuffle3 llength 1052.5150.8869.0064.0062.00241.00
206KLIST shuffle3 llength 100530.68477.80610.00601.00531.003163.00
207KLIST shuffle3 llength 10005445.835212.516568.006501.005781.00101953.0
208KLIST shuffle3 llength 1000097967.4093948.40109764.0120546.0109416.0-=-
209KLIST shuffle4 llength 110.0111.1715.0015.0011.0032.00
210KLIST shuffle4 llength 1053.6153.9276.0071.0066.00265.00
211KLIST shuffle4 llength 100520.41505.37703.00665.00590.004144.00
212KLIST shuffle4 llength 10005156.045103.417021.006593.005746.00177116.0
213KLIST shuffle4 llength 1000056581.2054739.4080533.0071578.0065448.00-=-
214KLIST shuffle5-s llength 16.095.716.006.005.0025.00
215KLIST shuffle5-s llength 1041.8142.7753.0037.0032.00172.00
216KLIST shuffle5-s llength 100531.56612.47748.00443.00411.002000.00
217KLIST shuffle5-s llength 100019600.3021734.5227485.0013934.0014748.0057793.00
218KLIST shuffle5a llength 17.407.038.007.006.0029.00
219KLIST shuffle5a llength 1051.2047.3647.0044.0038.00202.00
220KLIST shuffle5a llength 100501.93468.62443.00401.00351.002564.00
221KLIST shuffle5a llength 10005639.304920.484867.004382.003941.0074928.00
222KLIST shuffle5a llength 1000095913.9091491.3092334.0088038.0085968.00-=-
223KLIST shuffle6 llength 12.211.96-=--=--=--=-
224KLIST shuffle6 llength 1025.8722.91-=--=--=--=-
225KLIST shuffle6 llength 100239.79211.10-=--=--=--=-
226KLIST shuffle6 llength 10002426.892113.45-=--=--=--=-
227KLIST shuffle6 llength 1000027894.4025867.00-=--=--=--=-
228LIST append to list2.502.444.004.004.003.00
229LIST concat APPEND 2x1012.2112.6517.0013.0010.005.00
230LIST concat APPEND 2x10090.2095.11118.00101.0088.0022.00
231LIST concat APPEND 2x1000811.54862.781041.00889.00773.00162.00
232LIST concat APPEND 2x100008918.899751.6611234.009837.008772.001564.00
233LIST concat CONCAT 2x104.014.935.0010.008.007.00
234LIST concat CONCAT 2x1005.848.798.0089.0078.0029.00
235LIST concat CONCAT 2x100028.1838.4235.00786.00691.00201.00
236LIST concat CONCAT 2x10000356.50381.98450.008846.007882.001960.00
237LIST concat EVAL/LAPPEND 2x108.708.7211.0016.0012.009.00
238LIST concat EVAL/LAPPEND 2x10012.6513.4314.0040.0033.0051.00
239LIST concat EVAL/LAPPEND 2x100066.6954.1647.00264.00254.00369.00
240LIST concat EVAL/LAPPEND 2x10000770.93784.13616.004177.002693.003883.00
241LIST concat FOREACH/LAPPEND 2x108.5813.7824.0021.0015.0020.00
242LIST concat FOREACH/LAPPEND 2x10055.8038.80105.00103.00100.00135.00
243LIST concat FOREACH/LAPPEND 2x1000457.49336.33967.00968.00914.001157.00
244LIST concat FOREACH/LAPPEND 2x100004592.263327.3210000.009974.008864.0011889.00
245LIST concat SET 2x109.7210.4110.0010.008.006.00
246LIST concat SET 2x10084.2186.4297.0089.0076.0024.00
247LIST concat SET 2x1000763.76775.73914.00810.00686.00170.00
248LIST concat SET 2x100008282.028672.0410151.008883.007879.001746.00
249LIST exact search, first item2.842.982.002.002.00154.00
250LIST exact search, last item13.0413.2412.0012.0011.00152.00
251LIST exact search, middle item4.654.754.004.003.00151.00
252LIST exact search, non-item37.3136.5535.0035.0034.00155.00
253LIST exact search, typed item7.308.4112.0012.0011.00154.00
254LIST exact search, untyped item13.8513.0212.0012.0012.00152.00
255LIST index first element2.212.352.002.002.0033.00
256LIST index last element2.372.632.002.002.0045.00
257LIST index middle element2.192.382.002.002.0037.00
258LIST insert an item at "end"17.1417.6518.0023.0014.00112.00
259LIST insert an item at middle16.7918.6619.0027.0016.0055.00
260LIST insert an item at start16.9418.7120.0028.0016.0043.00
261LIST iterate list454.48626.671300.001194.001283.00127403.0
262LIST join list243.04244.36248.00244.00185.00285.00
263LIST large, early range5.506.015.005.004.0044.00
264LIST large, late range5.115.875.005.005.0048.00
265LIST length, pure list2.202.242.002.002.00177.00
266LIST list6.996.2110.007.007.0018.00
267LIST lset foreach l589.75645.81=8.4=8.4=8.4=8.4
268LIST lset foreach list587.49645.09=8.4=8.4=8.4=8.4
269LIST lset foreach ""s l140.38171.64=8.4=8.4=8.4=8.4
270LIST lset foreach ""s list139.97172.48=8.4=8.4=8.4=8.4
271LIST regexp search, first item3.125.945.007.002.00149.00
272LIST regexp search, last item49.33316.94317.00311.0054.00227.00
273LIST regexp search, non-item96.98670.10660.00657.0081.00242.00
274LIST remove first element15.8618.6822.0027.0016.0043.00
275LIST remove in mixed list15.8722.1924.00429.0020.0055.00
276LIST remove last element15.9018.1721.0026.0016.0060.00
277LIST remove middle element16.0218.5021.0027.0016.0053.00
278LIST replace first el with multiple16.6018.8522.0027.0016.0047.00
279LIST replace first element16.5217.2520.0022.0014.0049.00
280LIST replace in mixed list16.3820.5422.00427.0018.0057.00
281LIST replace last el with multiple16.6317.5820.0023.0015.00131.00
282LIST replace last element16.1317.0620.0023.0014.00112.00
283LIST replace middle el with multiple16.8218.2021.0025.0016.0095.00
284LIST replace middle element16.3517.2520.0022.0014.0091.00
285LIST replace range5.5824.0927.0029.0015.0087.00
286LIST reverse core15.968.5+8.5+8.5+8.5+8.5+
287LIST reverse lappend451.96590.061607.001466.001419.0046343.00
288LIST small, early range3.144.283.003.002.0032.00
289LIST small, late range3.123.453.003.002.0045.00
290LIST sort476.46447.73434.00422.00435.00544.00
291LIST sorted search, first item2.973.332.002.002.00149.00
292LIST sorted search, last item3.203.2612.0012.0011.00155.00
293LIST sorted search, middle item3.033.254.004.003.00152.00
294LIST sorted search, non-item2.963.5336.0035.0033.00158.00
295LIST sorted search, typed item2.923.3012.0012.0011.00151.00
296LIST typed sort346.21391.15522.00332.00336.001768.00
297LOOP for (to 1000)237.54263.89491.00514.00517.003084.00
298LOOP for, iterate list350.91495.09969.001072.00931.0045020.00
299LOOP for, iterate string622.92701.721364.001307.001178.007424.00
300LOOP foreach, iterate list377.37255.83380.00400.00381.001077.00
301LOOP foreach, iterate string422.01298.85426.00733.00714.001027.00
302LOOP while (to 1000)239.49267.47489.00517.00518.003055.00
303LOOP while 1 (to 1000)189.99253.13436.00475.00496.003245.00
304MAP ([chars])-case regsub51.1354.5749.0055.0011.0016.00
305MAP http mapReply11553.4620411.9618878.0019091.0016325.007534.00
306MAP regsub -nocase, no match268.28272.56584.00552.00267.00271.00
307MAP regsub 1 val209.28215.28817.00811.00132.00242.00
308MAP regsub 1 val -nocase310.91298.24812.00803.00207.00292.00
309MAP regsub 2 val566.12567.543779.003765.00367.00580.00
310MAP regsub 2 val -nocase765.68728.653813.003763.00492.00676.00
311MAP regsub 3 val800.82795.705127.005114.00482.00767.00
312MAP regsub 3 val -nocase1102.261041.485152.005150.00625.00917.00
313MAP regsub 4 val1031.541036.866460.006412.00626.00949.00
314MAP regsub 4 val -nocase1357.971336.396489.006418.00804.001114.00
315MAP regsub short8.3311.1429.0033.007.0017.00
316MAP regsub, no match79.8477.09569.00544.00135.00184.00
317MAP string -nocase, no match459.71424.734261.004307.00nomapnomap
318MAP string 1 val205.73210.551422.001358.00nomapnomap
319MAP string 1 val -nocase308.43307.632399.002442.00nomapnomap
320MAP string 2 val405.00403.171446.001424.00nomapnomap
321MAP string 2 val -nocase590.46575.603406.003421.00nomapnomap
322MAP string 3 val454.43453.431676.001712.00nomapnomap
323MAP string 3 val -nocase722.94678.794246.004278.00nomapnomap
324MAP string 4 val570.11582.071784.001821.00nomapnomap
325MAP string 4 val -nocase976.57955.214847.004908.00nomapnomap
326MAP string short7.477.517.007.00nomapnomap
327MAP string, no match203.66202.911923.001942.00nomapnomap
328MAP |-case regsub28.0131.2027.0029.008.0012.00
329MAP |-case strmap6.336.428.008.00nomapnomap
330MATRIX mult 5x5169.16155.37254.00257.00247.001058.00
331MATRIX mult 10x101183.191039.681656.001655.001488.007811.00
332MATRIX mult 15x153908.413428.745225.005229.004801.0027601.00
333MATRIX transposition-01456.241221.873422.003361.003266.007526.00
334MATRIX transposition-1699.26924.712479.002747.002298.0025932.00
335MD5 msg len 10431.98397.87417.00423.00-=--=-
336MD5 msg len 100739.92677.12702.00706.00-=--=-
337MD5 msg len 10005143.604630.404818.004639.00-=--=-
338MD5 msg len 1000049156.8044060.4046124.0044573.00-=--=-
339MTHD array stored proc call2.292.412.002.001.00-=-
340MTHD call absolute4.734.535.005.004.00-=-
341MTHD call relative5.395.546.005.004.00-=-
342MTHD direct ns proc call2.891.671.001.001.00-=-
343MTHD imported ns proc call1.691.832.001.002.00-=-
344MTHD indirect proc eval4.906.255.009.007.00-=-
345MTHD indirect proc eval #24.217.677.008.007.00-=-
346MTHD inline call1.030.711.001.000.00-=-
347MTHD interp alias proc call2.062.293.003.002.00-=-
348MTHD ns lookup call14.1414.9712.0019.0016.00-=-
349MTHD switch method call8.476.856.0011.009.00-=-
350NS alternating364.53372.10330.00492.00203.00-=-
351PARSE html form upload (7978)2575.352783.003724.003441.002920.00-=-
352PARSE html form upload (993570)296992.5322107.0445290.0405460.0344897.0-=-
353PROC do-nothing, no args1.461.411.005.001.001.00
354PROC do-nothing, one arg1.521.781.001.001.001.00
355PROC empty, no args0.450.441.004.001.001.00
356PROC empty, use args0.470.442.002.001.001.00
357PROC explicit return1.782.662.001.001.002.00
358PROC explicit return (2)1.541.593.003.001.002.00
359PROC explicit return (3)1.521.571.001.001.001.00
360PROC heavily commented1.541.501.001.001.0076.00
361PROC implicit return1.591.572.001.001.002.00
362PROC implicit return (2)1.591.701.001.002.002.00
363PROC implicit return (3)1.551.591.001.001.001.00
364PROC local links with global62.95128.81153.00132.00122.00557.00
365PROC local links with upvar60.23106.27138.00111.00107.00545.00
366PROC local links with variable58.66103.26132.00105.0064.00544.00
367RE 1-char long-end15.1422.2219.0015.00200.00212.00
368RE 1-char long-end catching24.7233.2633.0029.00209.00221.00
369RE 1-char long-middle9.9211.9010.0010.00101.00112.00
370RE 1-char long-middle catching18.7922.7423.0023.00109.00124.00
371RE 1-char long-start4.404.684.004.003.0013.00
372RE 1-char long-start catching13.4115.4317.0017.0012.0023.00
373RE 1-char short4.294.714.004.003.004.00
374RE 1-char short catching13.4214.4617.0017.0012.0010.00
375RE basic3.614.044.003.003.004.00
376RE basic catching14.4618.3018.0018.0011.0010.00
377RE c-comment long19.2622.6920.0019.0019.0030.00
378RE c-comment long catching66.1161.8363.0063.0032.0051.00
379RE c-comment long nomatch28.2635.3330.0029.004.0021.00
380RE c-comment long nomatch catching29.2936.9430.0029.005.0022.00
381RE c-comment long pmatch31.1638.5732.0032.00125.00145.00
382RE c-comment long pmatch catching33.1639.0532.0032.00132.00151.00
383RE c-comment many *s32.2339.1532.0032.0037.0055.00
384RE c-comment many *s catching92.94101.9099.00103.0050.0097.00
385RE c-comment nomatch5.726.606.006.002.004.00
386RE c-comment nomatch catching7.157.166.007.003.006.00
387RE c-comment simple10.0910.8511.0010.005.007.00
388RE c-comment simple catching42.1445.2048.0049.0016.0014.00
389RE count all matches29.4831.8028.0072.0065.00135.00
390RE extract all matches33.5536.8432.0095.0074.00173.00
391RE literal regexp6.669.018.008.004.004.00
392RE n-char long-end15.5219.5116.0020.00211.00220.00
393RE n-char long-end catching27.8933.2232.0036.00218.00232.00
394RE n-char long-middle10.2612.3310.0010.00105.00117.00
395RE n-char long-middle catching22.1627.0128.0026.00114.00131.00
396RE n-char long-start4.435.564.004.003.0014.00
397RE n-char long-start catching16.2418.6220.0020.0012.0026.00
398RE n-char short4.545.304.004.003.004.00
399RE n-char short catching15.5517.4520.0020.0011.0010.00
400RE static anchored match1.571.705.005.002.003.00
401RE static anchored match dot1.776.125.005.002.003.00
402RE static anchored nomatch1.651.563.002.002.003.00
403RE static anchored nomatch dot1.693.073.002.002.003.00
404RE static l-anchored match1.801.804.003.002.003.00
405RE static l-anchored nomatch1.661.822.002.002.003.00
406RE static long match4.464.5311.0011.006.0015.00
407RE static long nomatch5.956.8218.0017.007.0017.00
408RE static r-anchored match1.901.765.004.002.003.00
409RE static r-anchored nomatch1.951.864.004.002.003.00
410RE static short match1.851.915.004.002.003.00
411RE static short nomatch1.971.813.003.002.002.00
412RE var ***= directive match2.578.567.007.00-=--=-
413RE var ***= directive nomatch2.568.637.007.00-=--=-
414RE var . match2.894.364.004.002.007.00
415RE var ^$ nomatch2.563.603.003.002.006.00
416RE var-based regexp7.258.037.007.006.007.00
417READ 595K, cat53165.0755403.0399834.0082587.0044538.0053095.00
418READ 595K, gets34358.2737000.4777857.0062522.0045385.0051134.00
419READ 595K, glob-grep match48736.9755940.8090495.0085212.0074285.0079192.00
420READ 595K, glob-grep nomatch45782.5750096.47113438.0106001.076071.0076835.00
421READ 595K, read8429.578953.4019701.0019740.00158359.0165358.0
422READ 595K, read & size8371.938839.5319677.0019789.007404.00165318.0
423READ 595K, read dyn buf8875.408704.1319829.008.3+8.3+8.3+
424READ 595K, read small buf78412.4794984.97107228.08.3+8.3+8.3+
425READ 3050b, cat337.54365.24570.00529.00294.00334.00
426READ 3050b, gets187.64206.50392.00333.00279.00287.00
427READ 3050b, glob-grep match270.52315.98481.00454.00373.00419.00
428READ 3050b, glob-grep nomatch265.42271.48582.00557.00381.00419.00
429READ 3050b, read60.1064.58103.0097.0048.0069.00
430READ 3050b, read & size65.4669.74105.00112.0055.0074.00
431READ 3050b, read dyn buf72.4678.76120.008.3+8.3+8.3+
432READ 3050b, read small buf418.92521.78567.008.3+8.3+8.3+
433READ bin 595K, cat36064.8772125.9396901.0085158.0038002.0052990.00
434READ bin 595K, gets22830.2740673.8377260.0062165.0037047.0050718.00
435READ bin 595K, glob-grep match26220.7059242.5789689.0084712.0068787.0078770.00
436READ bin 595K, glob-grep nomatch26481.0054880.97111857.0105814.070451.0076112.00
437READ bin 595K, read2668.036021.476117.006260.00158371.0165114.0
438READ bin 595K, read & size2652.476087.706130.006288.007476.00164980.0
439READ bin 595K, read dyn buf2741.735985.806080.008.3+8.3+8.3+
440READ bin 595K, read small buf60491.5380789.0780597.008.3+8.3+8.3+
441READ bin 3050b, cat272.32478.50629.00529.00343.00331.00
442READ bin 3050b, gets160.50250.90416.00348.00263.00282.00
443READ bin 3050b, glob-grep match276.88368.68504.00485.00408.00421.00
444READ bin 3050b, glob-grep nomatch248.20325.64619.00573.00440.00412.00
445READ bin 3050b, read38.9451.2844.0040.0054.0070.00
446READ bin 3050b, read & size47.3054.8453.0046.0062.0076.00
447READ bin 3050b, read dyn buf48.2656.5651.008.3+8.3+8.3+
448READ bin 3050b, read small buf336.74443.34440.008.3+8.3+8.3+
449SHA (A) msg len 10598.41705.88906.00849.00-=--=-
450SHA (A) msg len 1001098.901271.051666.001541.00-=--=-
451SHA (A) msg len 10007809.109316.3012199.0011595.00-=--=-
452SHA (A) msg len 1000075316.6090150.80117887.0111223.0-=--=-
453SHA (B) msg len 10-=-641.05852.00811.00-=--=-
454SHA (B) msg len 100-=-1171.601579.001493.00-=--=-
455SHA (B) msg len 1000-=-8307.5011373.0011020.00-=--=-
456SHA (B) msg len 10000-=-79156.80109957.0106350.0-=--=-
457SPLIT iter, 4000 uchars2041.541465.672007.003151.002842.004021.00
458SPLIT iter, 4010 chars2061.571408.901939.003225.002829.004031.00
459SPLIT iter, rand 100 c92.1689.79123.0089.0068.00-=-
460SPLIT iter, rand 1000 c631.10574.31752.00870.00709.00-=-
461SPLIT iter, rand 10000 c4852.974002.636084.009131.007387.00-=-
462SPLIT on 'c', 4000 uchars89.8978.52202.00258.0095.00349.00
463SPLIT on 'c', 4010 chars87.4676.06192.00233.0098.00335.00
464SPLIT on 'cz', 4000 uchars224.40220.71358.00449.00181.00441.00
465SPLIT on 'cz', 4010 chars205.25201.94350.00425.00179.00425.00
466SPLIT on 'cû', 4000 uchars255.99258.51368.00445.00182.00434.00
467SPLIT on 'cû', 4010 chars181.94169.19268.00345.00105.00324.00
468SPLIT, 4000 uchars543.38483.11485.001590.001343.00382.00
469SPLIT, 4010 chars603.51424.01471.001564.001334.00351.00
470SPLIT, rand 100 c58.7079.2882.0042.0030.00-=-
471SPLIT, rand 1000 c326.20316.82322.00409.00325.00-=-
472SPLIT, rand 10000 c1499.241455.691474.004603.003652.00-=-
473STR append13.3513.0216.0015.0013.0064.00
474STR append (1KB + 1KB)5.926.5610.009.006.0038.00
475STR append (1MB + (1b+1K+1b)*100)3985.013672.186711.007264.007212.0029579.00
476STR append (1MB + 1KB)3322.443194.166234.006810.006770.0029010.00
477STR append (1MB + 1KB*20)3394.053262.356284.006867.006826.0028666.00
478STR append (1MB + 1KB*1000)6838.866488.7310153.0011231.0011031.0038866.00
479STR append (1MB + 1MB*3)13134.7012139.0615090.0016643.0016635.0075623.00
480STR append (1MB + 1MB*5)16424.4415231.6232053.0032183.0032072.00103130.0
481STR append (1MB + 2b*1000)3735.973657.107480.007945.007913.0028458.00
482STR append (10KB + 1KB)8.117.6914.0012.0011.00149.00
483STR first (failure)14.0614.1913.0013.0012.0047.00
484STR first (failure) utf13.8613.9857.0056.0012.0048.00
485STR first (success)2.813.083.003.002.0036.00
486STR first (success) utf2.753.133.003.002.0032.00
487STR first (total failure)11.2811.465.004.004.0046.00
488STR first (total failure) utf11.6211.495.005.004.0045.00
489STR index 02.872.803.003.002.0034.00
490STR index 1002.952.884.003.002.0036.00
491STR index 5002.892.933.003.002.0035.00
492STR info locals match120.43133.83142.00140.00116.00480.00
493STR last (failure)24.8925.0423.0023.0016.0051.00
494STR last (success)2.863.1153.0054.002.0062.00
495STR last (total failure)17.0017.9715.0015.0010.0047.00
496STR length (==4010)2.182.272.002.002.0036.00
497STR length growing (1000)399.20394.22980.00994.00901.002423.00
498STR length growing uc (1000)384.23402.19963.001006.00903.002423.00
499STR length of a LIST2.132.152.002.002.0030.00
500STR length static str1.661.582.002.002.005.00
501STR match, complex (failure 2)29368.6931034.14359961.0360482.0116783.0118085.0
502STR match, complex (failure)20.0321.20209.00209.0068.00103.00
503STR match, complex (success early)2.502.684.004.003.0031.00
504STR match, complex (success late)26.9927.24215.00216.0069.00109.00
505STR match, complex (total failure)13.3214.49203.00202.0065.00104.00
506STR match, exact (failure)1.621.672.002.001.002.00
507STR match, exact (success)1.611.662.002.002.002.00
508STR match, exact -nocase (failure)1.681.752.002.002.003.00
509STR match, exact -nocase (success)2.632.703.002.002.003.00
510STR match, simple (failure)1.651.802.002.001.003.00
511STR match, simple (success)1.791.802.002.001.003.00
512STR range, index 100..200 of 40103.583.913.003.003.0035.00
513STR repeat, 4010 chars * 1032.9135.2834.0054.0055.00362.00
514STR repeat, 4010 chars * 1001089.481217.721215.002522.002681.0010152.00
515STR repeat, abcdefghij * 103.473.513.004.0014.0042.00
516STR repeat, abcdefghij * 1009.529.549.0017.00114.00339.00
517STR repeat, abcdefghij * 100071.4870.8871.00124.001071.003346.00
518STR replace, equal replacement11.5911.3561.0060.0012.0076.00
519STR replace, longer replacement11.8711.9862.0061.0012.0079.00
520STR replace, no replacement10.7712.1161.0063.0012.0076.00
521STR reverse core, 10 c3.558.5+8.5+8.5+8.5+8.5+
522STR reverse core, 10 uc3.818.5+8.5+8.5+8.5+8.5+
523STR reverse core, 100 c4.308.5+8.5+8.5+8.5+8.5+
524STR reverse core, 100 uc4.178.5+8.5+8.5+8.5+8.5+
525STR reverse core, 400 c5.538.5+8.5+8.5+8.5+8.5+
526STR reverse core, 400 uc5.748.5+8.5+8.5+8.5+8.5+
527STR reverse iter/append, 10 c12.0012.8624.0024.0018.0042.00
528STR reverse iter/append, 10 uc12.2312.7524.0023.0018.0042.00
529STR reverse iter/append, 100 c81.6281.56189.00190.00151.00389.00
530STR reverse iter/append, 100 uc88.7586.72185.00189.00152.00389.00
531STR reverse iter/append, 400 c321.90305.51717.00723.00585.002045.00
532STR reverse iter/append, 400 uc349.73326.55701.00739.00592.002039.00
533STR reverse iter/set, 10 c13.7414.2420.0020.0016.0045.00
534STR reverse iter/set, 10 uc13.5214.9920.0020.0016.0044.00
535STR reverse iter/set, 100 c116.78136.27186.00181.00140.00450.00
536STR reverse iter/set, 100 uc124.15148.19191.00186.00141.00453.00
537STR reverse iter/set, 400 c559.62601.93836.00810.00638.002535.00
538STR reverse iter/set, 400 uc601.66618.56845.00836.00667.002547.00
539STR reverse recursive, 10 c37.9441.1946.0045.0034.0081.00
540STR reverse recursive, 10 uc37.6339.0146.0045.0033.0082.00
541STR reverse recursive, 100 c405.68508.84555.00515.00391.00911.00
542STR reverse recursive, 100 uc405.83498.90881.00700.00392.00915.00
543STR reverse recursive, 400 c2625.412938.273310.003238.002742.008.0+
544STR reverse recursive, 400 uc2632.043097.736940.006346.002736.008.0+
545STR str $a eq $b3.063.455.005.005.0016.00
546STR str $a eq $b (same obj)3.053.385.005.005.0015.00
547STR str $a equal ""2.262.504.004.004.0014.00
548STR str $a ne $b3.193.665.005.004.0014.00
549STR str $a ne $b (same obj)3.353.285.005.005.0014.00
550STR str num == ""2.622.643.003.003.0015.00
551STR string compare3.293.594.004.004.007.00
552STR string compare ""3.223.514.004.004.0012.00
553STR string compare long38.2238.6139.0039.0039.00187.00
554STR string compare long (same obj)2.953.3739.0039.0038.00180.00
555STR string compare mixed long60.1665.6744.0043.0043.00184.00
556STR string compare uni long44.5646.1844.0044.0038.00179.00
557STR string equal ""2.573.004.004.004.0011.00
558STR string equal long (!= len)7.728.2545.0044.0043.00204.00
559STR string equal long (== len)37.9338.2640.0040.0040.00209.00
560STR string equal long (same obj)3.153.5040.0040.0039.00202.00
561STR string equal mixed long3.373.6241.0040.0039.00207.00
562STR string equal uni long43.1843.4245.0045.0040.00200.00
563STR/LIST length, obj shimmer419.27417.77507.00457.003.00202.00
564SWITCH 1st true2.105.785.004.004.0016.00
565SWITCH 2nd true2.045.445.004.004.0016.00
566SWITCH 9th true2.126.095.005.005.0016.00
567SWITCH default true1.986.116.005.005.0016.00
568TRACE all set (rwu)3.955.044.003.003.006.00
569TRACE no trace set4.055.426.004.005.006.00
570TRACE read5.164.924.004.003.006.00
571TRACE unset3.995.034.003.003.006.00
572TRACE write4.116.714.003.003.006.00
573UNSET catch var !exist16.179.848.0010.006.006.00
574UNSET catch var exists3.002.602.002.003.003.00
575UNSET info check var !exist2.422.532.002.002.003.00
576UNSET info check var exists2.133.122.002.002.004.00
577UNSET nocomplain var !exist2.142.618.009.007.005.00
578UNSET nocomplain var exists2.162.462.002.002.003.00
579UNSET var exists2.043.472.002.002.002.00
580VAR 'array set' of 100 elems25.2129.4744.0045.0040.0080.00
581VAR 100 'set's in array26.0224.9824.0023.0026.0068.00
582VAR access global2.523.084.004.004.005.00
583VAR access local proc arg2.031.952.003.002.006.00
584VAR access locally set3.222.942.002.002.005.00
585VAR access upvar2.613.144.004.004.006.00
586VAR incr global var 1000x475.71410.41700.00646.00694.003792.00
587VAR incr local var 1000x472.52405.46690.00667.00701.003796.00
588VAR incr upvar var 1000x477.60420.17674.00650.00705.003721.00
589VAR mset3.064.086.005.005.0017.00
590VAR mset (foreach)2.562.813.002.002.008.00
591VAR ref absolute118.2077.25105.00110.0084.008.0+
592VAR ref local9.6113.4822.0023.0022.008.0+
593VAR ref variable10.6714.2453.0053.0044.008.0+
594VAR set array element2.323.002.002.002.003.00
595VAR set scalar1.591.641.001.001.002.00
596WORDCOUNT wc1810.48882.41903.00857.00348.00479.00
597WORDCOUNT wc2194.60197.78499.00510.00221.00300.00
598WORDCOUNT wc3177.89182.13472.00486.00200.00221.00
598BENCHMARKS1:8.5b2.12:8.4.173:8.3.54:8.2.35:8.0.56:7.6p2
 FINISHED 2007-11-16 17:20:59

JH: The numbers below by Kevin are for a previous set of numbers, and need updating (note only 8.4a3 is mentioned). The only thing likely to change though is to show that 8.4 is pulling ahead in performance.

Kevin Kenny: For those that insist on a single figure of merit, I took these numbers, normalized them to a scale of 8.4a3 == 1.0, and then took the harmonic mean of all benchmarks.

Version Relative Speed Comments
7.6p2 0.125 The last version without bytecode compilation
8.0.5 0.736 Bytecode compilation initially sped things up by a factor of about 6.
8.2.3 0.600 The cost of internationalization was that things got about 20% slower.
8.3.1 0.606 Not much change here...
8.4a3 1.000 The reference against which the others were measured. Many more operations are bytecoded, which gains about 50% in speed.
8.5.? ????? Much more bytecoding, but many operations slowed down to support new features (especially clock and arbitrary-width integers).

As with all benchmarks, take these numbers with a spoonful of salt!


TCL benchmarks compared with other languages