[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 [http://tcllib.sf.net/] 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 [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcllib/] to do relative benchmarks themselves, but below I've posted the results from a full run over the benchmark suite. The numbers are microseconds, but you should only look at them relative to each other. There is some fluctuation expected as Tcl's 'time' does wall timing, not true cpu time. In any case, these were done on a dual P3-550 with 512MB physmem SuSE 7.3 box. Dual doesn't make any difference - all interpreters were compiled static with no threads. Except for 8.4a4, all represent the final code of that version. 8.4a4 is the head CVS code as of February 7, 2002. 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.4a4 as a norm of 1.0 to compare against. 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] [http://www.activestate.com/]. For those interested in the use of threads for concurrent processing, please see the [Tcl Bechmarks with Threads]. ---- TCL_INTERP: 1:8.4a4 2:8.3.4 3:8.2.3 4:8.0.5 5:7.6p2 STARTED 2002-02-07 17:27:54 (runbench.tcl v1.12) Benchmark 1:8.4a4 /home/jeffh/install/linux-ix86/bin/tclsh8.4 bbccdeefhkllmmmmprrssstuvw 00:04:40 elapsed Benchmark 2:8.3.4 /home/jeffh/install/linux-ix86/bin/tclsh8.3 bbccdeefhkllmmmmprrssstuvw 00:06:09 elapsed Benchmark 3:8.2.3 /home/jeffh/install/linux-ix86/bin/tclsh8.2 bbccdeefhkllmmmmprrssstuvw 00:06:17 elapsed Benchmark 4:8.0.5 /home/jeffh/install/linux-ix86/bin/tclsh8.0 bbccdeefhkllmmmmprrssstuvw 00:05:41 elapsed Benchmark 5:7.6p2 /home/jeffh/install/linux-ix86/bin/tclsh7.6 bbccdeefhkllmmmmprrssstuvw 00:19:51 elapsed 000 VERSIONS: 1:8.4a4 2:8.3.4 3:8.2.3 4:8.0.5 5:7.6p2 001 BASE64 decode 10 511 496 468 472 -=- 002 BASE64 decode 100 4126 3996 3880 3951 -=- 003 BASE64 decode 1000 40100 38452 37948 38553 -=- 004 BASE64 decode 10000 398948 385431 380629 388511 -=- 005 BASE64 decode2 10 493 489 461 457 -=- 006 BASE64 decode2 100 4013 3897 3748 3816 -=- 007 BASE64 decode2 1000 38591 37543 36732 37476 -=- 008 BASE64 decode2 10000 383348 374437 368056 376856 -=- 009 BASE64 encode 10 334 373 339 395 -=- 010 BASE64 encode 100 2725 3098 2946 3469 -=- 011 BASE64 encode 1000 26403 30257 28813 34252 -=- 012 BASE64 encode 10000 262417 303689 287545 342253 -=- 013 BASE64 encode2 10 311 367 325 380 -=- 014 BASE64 encode2 100 2513 3092 2791 3374 -=- 015 BASE64 encode2 1000 24414 30139 27259 33121 -=- 016 BASE64 encode2 10000 245120 301034 271488 331160 -=- 017 BIN bitset-v1 1000 chars 17171 16164 15624 14173 -=- 018 BIN bitset-v1 5000 chars 83455 78300 78462 70612 -=- 019 BIN bitset-v1 10000 chars 166239 156929 158093 142259 -=- 020 BIN bitset-v2 1000 chars 8258 10097 9104 8121 -=- 021 BIN bitset-v2 5000 chars 39859 50858 45485 40506 -=- 022 BIN bitset-v2 10000 chars 80740 101651 90878 81302 -=- 023 BIN bitset-v3 1000 chars 2544 4973 4581 4037 -=- 024 BIN bitset-v3 5000 chars 11564 24266 22529 20126 -=- 025 BIN bitset-v3 10000 chars 23380 49580 45954 41013 -=- 026 BIN c scan, 1000b 597 392 389 306 -=- 027 BIN c scan, 5000b 1980 1848 1843 1458 -=- 028 BIN c scan, 10000b 3673 3837 3703 3022 -=- 029 CATCH no catch used 3 3 3 3 6 030 CATCH return error 34 33 32 28 20 031 CATCH return ok 4 3 3 3 11 032 DATA access in a list 1628 2086 1782 1705 40826 033 DATA access in an array 2098 2136 2071 1827 7177 034 DATA create in a list 1084 2298 2188 2061 6573 035 DATA create in an array 2722 2590 2629 3270 8388 036 EVAL cmd and mixed lists 1691 1415 3870 2708 562 037 EVAL cmd eval as list 9 10 28 26 11 038 EVAL cmd eval as string 25 25 30 27 12 039 EVAL cmd eval in list obj var 11 12 30 27 15 040 EVAL list cmd and mixed lists 1701 1420 3886 2712 563 041 EVAL list cmd and pure lists 237 237 3884 2712 564 042 EXPR braced 13 13 12 10 78 043 EXPR fifty operands 22 21 21 18 84 044 EXPR incr with expr 4 3 3 3 16 045 EXPR incr with incr 5 5 4 3 11 046 EXPR inline 14 14 13 11 36 047 EXPR one operand 3 3 3 3 13 048 EXPR ten operands 7 6 6 5 27 049 EXPR unbraced 93 89 92 73 73 050 FCOPY binary: 160K 7780 7828 7698 -=- -=- 051 FCOPY encoding: 160K 30476 7764 7807 -=- -=- 052 FCOPY std: 160K 7760 7741 7698 8119 8131 053 HEAPSORT size 10 591 571 535 4745 3267 054 HEAPSORT size 50 3967 3802 3691 27539 24924 055 HEAPSORT size 100 8944 8695 8406 57678 57677 056 IF else true al 15 15 14 12 45 057 IF else true numeric 8 8 7 7 40 058 IF elseif true al 15 15 14 12 44 059 IF elseif true numeric 8 8 7 7 38 060 IF if false al/al 10 10 9 8 33 061 IF if false al/num 9 9 8 7 53 062 IF if false num/num 6 6 6 6 33 063 IF if true al 10 10 9 8 34 064 IF if true al/al 10 11 10 8 33 065 IF if true num/num 7 7 6 6 32 066 IF if true numeric 6 6 6 5 30 067 IF multi 1st true 6 6 6 6 49 068 IF multi 2nd true 8 8 7 7 52 069 IF multi 9th true 16 16 15 14 89 070 IF multi default true 16 16 15 14 91 071 KLIST shuffle0 llength 1 53 76 71 66 8.0+ 072 KLIST shuffle0 llength 10 135 221 214 195 8.0+ 073 KLIST shuffle0 llength 100 1086 1790 1745 1566 8.0+ 074 KLIST shuffle0 llength 1000 12503 19260 19031 16924 8.0+ 075 KLIST shuffle0 llength 10000 171748 236685 233888 208725 -=- 076 KLIST shuffle1-s llength 1 44 48 45 35 123 077 KLIST shuffle1-s llength 10 221 213 214 210 920 078 KLIST shuffle1-s llength 100 2886 2724 2673 2350 15809 079 KLIST shuffle1-s llength 1000 273710 272088 241546 237731 935905 080 KLIST shuffle1a llength 1 53 55 52 39 156 081 KLIST shuffle1a llength 10 239 232 244 233 1204 082 KLIST shuffle1a llength 100 2270 2138 2344 2181 20117 083 KLIST shuffle1a llength 1000 22720 21611 23448 21680 1150589 084 KLIST shuffle1a llength 10000 229090 218977 236443 220705 -=- 085 KLIST shuffle2 llength 1 52 64 60 65 152 086 KLIST shuffle2 llength 10 253 289 268 350 979 087 KLIST shuffle2 llength 100 2400 2562 2406 3152 9370 088 KLIST shuffle2 llength 1000 24212 25711 24385 31383 94154 089 KLIST shuffle2 llength 10000 259828 276237 261340 341088 -=- 090 KLIST shuffle3 llength 1 42 58 54 44 116 091 KLIST shuffle3 llength 10 178 226 238 232 873 092 KLIST shuffle3 llength 100 1663 2018 2176 1964 10477 093 KLIST shuffle3 llength 1000 18324 21654 23047 20648 347950 094 KLIST shuffle3 llength 10000 402986 440613 462415 432027 -=- 095 KLIST shuffle4 llength 1 44 60 56 46 130 096 KLIST shuffle4 llength 10 193 247 254 250 970 097 KLIST shuffle4 llength 100 1756 2194 2312 2111 14098 098 KLIST shuffle4 llength 1000 17611 21629 23101 20812 664446 099 KLIST shuffle4 llength 10000 175823 217028 234061 211795 -=- 100 KLIST shuffle5-s llength 1 21 22 21 18 90 101 KLIST shuffle5-s llength 10 154 143 131 111 634 102 KLIST shuffle5-s llength 100 1722 1601 1338 1116 7245 103 KLIST shuffle5-s llength 1000 79914 78181 62348 59537 207675 104 KLIST shuffle5a llength 1 25 26 24 20 103 105 KLIST shuffle5a llength 10 161 144 132 114 776 106 KLIST shuffle5a llength 100 1460 1318 1169 1034 8861 107 KLIST shuffle5a llength 1000 15810 14379 12771 12141 268444 108 KLIST shuffle5a llength 10000 379864 361248 341744 342798 -=- 109 LIST append to list 7 17 15 13 11 110 LIST exact search, first item 8 7 6 6 431 111 LIST exact search, last item 35 32 30 28 448 112 LIST exact search, middle item 16 14 13 11 439 113 LIST exact search, non-item 99 92 92 87 471 114 LIST exact search, typed item 28 32 30 28 448 115 LIST exact search, untyped item 35 32 30 28 448 116 LIST index first element 6 6 5 5 143 117 LIST index last element 6 6 5 5 175 118 LIST index middle element 6 6 5 5 158 119 LIST insert an item at "end" 118 117 120 117 383 120 LIST insert an item at middle 127 123 127 125 237 121 LIST insert an item at start 128 125 127 126 220 122 LIST iterate list 2491 3922 3645 3432 352554 123 LIST join list 606 615 614 390 1119 124 LIST large, early range 15 15 13 10 173 125 LIST large, late range 16 15 15 11 181 126 LIST length, pure list 5 7 6 5 501 127 LIST list 24 24 22 20 61 128 LIST remove first element 125 122 125 124 189 129 LIST remove in mixed list 134 134 1104 133 235 130 LIST remove last element 125 123 123 121 253 131 LIST remove middle element 125 124 125 123 235 132 LIST replace first el with multiple 128 125 127 127 231 133 LIST replace first element 120 117 120 117 222 134 LIST replace in mixed list 129 127 1093 128 239 135 LIST replace last el with multiple 121 119 121 119 397 136 LIST replace last element 120 118 120 118 388 137 LIST replace middle el with multiple 126 124 124 123 378 138 LIST replace middle element 120 118 120 118 369 139 LIST replace range 116 113 118 116 280 140 LIST small, early range 10 10 8 7 148 141 LIST small, late range 10 10 8 7 175 142 LIST sort 1607 1604 1563 1508 1549 143 LIST sorted search, first item 8 7 6 6 431 144 LIST sorted search, last item 9 32 31 28 448 145 LIST sorted search, middle item 8 14 13 11 439 146 LIST sorted search, non-item 8 92 92 87 470 147 LIST sorted search, typed item 8 32 30 28 448 148 LIST typed sort 1383 1385 1335 1086 5494 149 LOOP for (to 1000) 1612 1613 1568 1527 11974 150 LOOP for, iterate list 2281 2936 2730 2524 147290 151 LOOP for, iterate string 3118 4324 4267 3447 37398 152 LOOP foreach, iterate list 1229 1185 1176 1091 3305 153 LOOP foreach, iterate string 1446 1400 2137 1859 3090 154 LOOP while (to 1000) 1612 1613 1568 1527 12242 155 MAP ([chars])-case regsub 174 179 178 35 54 156 MAP http mapReply 165913 164995 164628 153673 22547 157 MAP regsub -nocase, no match 1939 1657 1649 932 1238 158 MAP regsub 1 val 334 2685 2683 433 864 159 MAP regsub 1 val -nocase 1125 2686 2671 594 1071 160 MAP regsub 2 val 862 11861 11818 1092 1890 161 MAP regsub 2 val -nocase 2277 11856 11818 1437 2277 162 MAP regsub 3 val 1133 16179 16183 1493 2494 163 MAP regsub 3 val -nocase 3213 16173 16176 1974 3025 164 MAP regsub 4 val 1481 20473 20426 1881 3077 165 MAP regsub 4 val -nocase 4146 20458 20443 2511 3758 166 MAP regsub short 27 111 110 26 55 167 MAP regsub, no match 293 1657 1650 603 799 168 MAP string -nocase, no match 2122 11907 11795 -=- -=- 169 MAP string 1 val 313 4091 4142 nomap nomap 170 MAP string 1 val -nocase 1083 6446 6430 nomap nomap 171 MAP string 2 val 814 4986 5025 nomap nomap 172 MAP string 2 val -nocase 2087 9314 9379 nomap nomap 173 MAP string 3 val 1011 5951 5979 nomap nomap 174 MAP string 3 val -nocase 2720 12191 12109 nomap nomap 175 MAP string 4 val 1294 6431 6466 nomap nomap 176 MAP string 4 val -nocase 3351 14031 14085 nomap nomap 177 MAP string short 18 22 22 nomap nomap 178 MAP string, no match 500 5925 6004 -=- -=- 179 MAP |-case regsub 87 87 84 26 42 180 MAP |-case strmap 18 26 25 nomap nomap 181 MATRIX mult 5x5 513 722 698 592 3515 182 MATRIX mult 10x10 3304 4364 4298 3614 26096 183 MATRIX mult 15x15 10469 13539 13398 11213 90666 184 MATRIX transposition-0 4329 11319 10535 8597 28407 185 MATRIX transposition-1 3529 7627 6586 6050 108401 186 MD5 msg len 10 1521 1414 1322 1315 -=- 187 MD5 msg len 100 2673 2497 2321 2344 -=- 188 MD5 msg len 1000 19090 17669 16489 16677 -=- 189 MD5 msg len 10000 184694 170598 158812 161864 -=- 190 MTHD array stored proc call 5 5 4 4 -=- 191 MTHD call absolute 10 16 12 13 -=- 192 MTHD call relative 15 16 13 13 -=- 193 MTHD direct ns proc call 4 3 3 3 -=- 194 MTHD imported ns proc call 4 3 3 3 -=- 195 MTHD indirect proc eval 14 13 32 29 -=- 196 MTHD indirect proc eval #2 24 25 30 29 -=- 197 MTHD inline call 2 2 1 1 -=- 198 MTHD interp alias proc call 11 10 9 4 -=- 199 MTHD ns lookup call 49 49 66 56 -=- 200 MTHD switch method call 22 21 40 39 -=- 201 PROC do-nothing, no args 3 3 14 2 1 202 PROC do-nothing, one arg 3 3 3 2 4 203 PROC explicit return 3 4 3 3 6 204 PROC explicit return (2) 3 4 3 3 5 205 PROC explicit return (3) 3 4 3 3 5 206 PROC heavily commented 3 3 2 2 194 207 PROC implicit return 4 3 3 3 8 208 PROC implicit return (2) 3 3 3 3 6 209 PROC implicit return (3) 3 3 3 2 4 210 PROC local links with global 660 675 653 644 1586 211 PROC local links with upvar 594 591 584 577 1598 212 PROC local links with variable 562 564 550 330 1568 213 RE 1-char long-end 46 45 45 578 623 214 RE 1-char long-end catching 92 89 85 596 634 215 RE 1-char long-middle 32 30 29 294 336 216 RE 1-char long-middle catching 78 74 72 312 346 217 RE 1-char long-start 17 15 14 11 49 218 RE 1-char long-start catching 61 59 57 28 59 219 RE 1-char short 17 16 14 11 13 220 RE 1-char short catching 61 58 57 28 24 221 RE basic 15 14 12 11 14 222 RE basic catching 66 64 62 28 24 223 RE c-comment long 60 58 56 86 124 224 RE c-comment long catching 185 178 176 113 147 225 RE c-comment long nomatch 81 80 80 17 90 226 RE c-comment long nomatch catching 82 80 77 18 90 227 RE c-comment long pmatch 91 89 87 557 666 228 RE c-comment long pmatch catching 92 88 86 557 667 229 RE c-comment many *s 93 103 89 159 235 230 RE c-comment many *s catching 292 283 285 194 268 231 RE c-comment nomatch 23 22 20 9 14 232 RE c-comment nomatch catching 24 21 20 9 14 233 RE c-comment simple 36 35 33 21 25 234 RE c-comment simple catching 141 133 133 39 35 235 RE count all matches 99 97 283 241 491 236 RE extract all matches 118 114 346 287 649 237 RE literal regexp 24 23 20 15 16 238 RE n-char long-end 48 46 46 663 702 239 RE n-char long-end catching 102 99 95 683 711 240 RE n-char long-middle 33 31 30 336 375 241 RE n-char long-middle catching 86 84 82 355 386 242 RE n-char long-start 18 16 14 11 50 243 RE n-char long-start catching 71 70 66 29 60 244 RE n-char short 18 16 14 11 13 245 RE n-char short catching 70 68 64 30 24 246 RE static long match 17 34 33 23 58 247 RE static long nomatch 25 49 47 25 60 248 RE static short match 4 15 14 7 8 249 RE static short nomatch 4 9 8 5 8 250 RE var-based regexp 25 24 22 16 20 251 READ 595K, gets 217106 213537 197469 103697 172693 252 READ 595K, read 50865 55830 55979 220337 220179 253 READ 595K, read & size 50803 55877 55930 17546 221431 254 READ 3050b, gets 1180 1189 1118 606 988 255 READ 3050b, read 344 344 342 157 185 256 READ 3050b, read & size 350 354 350 162 197 257 READ bin 595K, gets 223362 220800 209405 103538 172164 258 READ bin 595K, read 11986 11606 12000 221552 220197 259 READ bin 595K, read & size 11976 11671 11943 17540 221171 260 READ bin 3050b, gets 1238 1236 1183 621 987 261 READ bin 3050b, read 153 149 145 176 192 262 READ bin 3050b, read & size 158 160 155 181 207 263 SHA sha1 msg len 10 3944 3729 3599 3898 -=- 264 SHA sha1 msg len 100 7424 6960 6701 7289 -=- 265 SHA sha1 msg len 1000 55511 52276 50255 55309 -=- 266 SHA sha1 msg len 10000 538482 510910 491535 538562 -=- 267 SHA sha1DF msg len 10 1687 2133 2004 1771 -=- 268 SHA sha1DF msg len 100 3237 4124 3872 3431 -=- 269 SHA sha1DF msg len 1000 24835 31983 30051 26592 -=- 270 SHA sha1DF msg len 10000 242293 312783 294140 260936 -=- 271 STARTUP time to launch tclsh 12484 11085 11362 11837 5695 272 STR append 56 38 36 28 245 273 STR append (1KB + 1KB) 23 33 31 24 148 274 STR append (1MB + (1b + 1K + 1b) * 100) 7687 15028 14907 14824 113600 275 STR append (1MB + 1KB * 20) 6551 13954 13920 13947 110045 276 STR append (1MB + 1KB * 1000) 13996 23659 22890 22516 152368 277 STR append (1MB + 1KB) 6411 13791 13788 13805 109451 278 STR append (1MB + 1MB * 3) 28363 35364 35502 35487 317346 279 STR append (1MB + 1MB * 5) 35658 71796 71935 71898 413487 280 STR append (1MB + 2b * 1000) 8403 18228 17266 17222 115690 281 STR append (10KB + 1KB) 50 88 85 79 647 282 STR first (failure) 81 35 33 33 189 283 STR first (failure) utf 81 133 129 31 189 284 STR first (success) 8 9 7 6 151 285 STR first (success) utf 8 10 9 6 152 286 STR first (total failure) 74 17 15 15 180 287 STR first (total failure) utf 73 18 16 15 179 288 STR index 0 9 11 9 7 177 289 STR index 100 10 10 9 7 177 290 STR index 500 10 10 9 7 178 291 STR info locals match 488 520 503 487 1421 292 STR last (failure) 58 63 62 49 189 293 STR last (success) 8 132 131 6 192 294 STR last (total failure) 44 51 50 35 180 295 STR length (==4010) 5 6 6 5 176 296 STR length of a LIST 5 6 5 5 172 297 STR length static str 3 6 5 5 20 298 STR match, complex (failure) 88 626 625 265 406 299 STR match, complex (success early) 7 13 12 8 148 300 STR match, complex (success late) 103 637 636 269 409 301 STR match, complex (total failure) 72 625 615 260 397 302 STR match, exact (failure) 4 5 4 4 7 303 STR match, exact (success) 3 6 5 4 7 304 STR match, exact -nocase (failure) 4 5 5 ERR ERR 305 STR match, exact -nocase (success) 7 8 7 ERR ERR 306 STR match, simple (failure) 4 5 4 4 10 307 STR match, simple (success) 4 5 4 4 9 308 STR range, index 100..200 of 4010 12 11 10 7 182 309 STR repeat, 4010 chars * 10 91 88 179 215 1794 310 STR repeat, 4010 chars * 100 1567 1609 3295 3636 15609 311 STR repeat, abcdefghij * 10 8 8 11 42 164 312 STR repeat, abcdefghij * 100 27 26 50 343 1336 313 STR repeat, abcdefghij * 1000 212 215 397 3359 13157 314 STR replace, equal replacement 44 179 176 26 401 315 STR replace, longer replacement 45 180 176 27 403 316 STR replace, no replacement 41 177 175 26 401 317 STR reverse iter/append, 10 c 48 90 83 64 178 318 STR reverse iter/append, 10 uc 47 89 82 64 177 319 STR reverse iter/append, 100 c 326 703 658 495 1647 320 STR reverse iter/append, 100 uc 327 711 644 504 1645 321 STR reverse iter/append, 400 c 1249 2760 2598 1960 9764 322 STR reverse iter/append, 400 uc 1235 2735 2520 1967 9772 323 STR reverse iter/set, 10 c 53 67 63 52 182 324 STR reverse iter/set, 10 uc 51 66 63 52 182 325 STR reverse iter/set, 100 c 427 535 527 424 1803 326 STR reverse iter/set, 100 uc 437 540 537 425 1800 327 STR reverse iter/set, 400 c 1784 2219 2189 1793 11789 328 STR reverse iter/set, 400 uc 1807 2226 2234 1783 11832 329 STR reverse recursive, 10 c 116 144 138 107 324 330 STR reverse recursive, 10 uc 110 145 140 106 327 331 STR reverse recursive, 100 c 1126 1428 1392 1091 3468 332 STR reverse recursive, 100 uc 1103 1851 1824 1078 3461 333 STR reverse recursive, 400 c 4875 5997 5963 4604 8.0+ 334 STR reverse recursive, 400 uc 5882 14017 14020 4608 8.0+ 335 STR split iter, 4000 uchars 6085 5858 8603 7428 12391 336 STR split iter, 4010 chars 6041 5828 8586 7442 12445 337 STR split iter, rand 100 c 297 289 233 198 -=- 338 STR split iter, rand 1000 c 1950 1887 2195 1884 -=- 339 STR split iter, rand 10000 c 15762 15170 22252 18867 -=- 340 STR split, 4000 uchars 1290 1192 3918 3017 1058 341 STR split, 4010 chars 1239 1156 3881 3062 1030 342 STR split, rand 100 c 169 165 109 85 -=- 343 STR split, rand 1000 c 754 718 1016 772 -=- 344 STR split, rand 10000 c 3766 3468 10329 7678 -=- 345 STR str $a eq $b 10 16 15 14 53 346 STR str $a eq $b (same obj) 10 16 15 14 52 347 STR str $a equal "" 7 11 11 8 65 348 STR str $a ne $b 10 16 15 15 49 349 STR str $a ne $b (same obj) 10 16 15 14 48 350 STR str num == "" 8 8 9 9 65 351 STR string compare 22 16 15 15 27 352 STR string compare "" 10 11 11 12 40 353 STR string compare long 320 192 190 190 891 354 STR string compare mixed long 620 199 196 194 892 355 STR string compare uni long 319 218 216 190 888 356 STR string equal "" 8 11 11 12 39 357 STR/LIST length, obj shimmer 1203 1211 1208 8 653 358 SWITCH 1st true 19 16 15 14 47 359 SWITCH 2nd true 19 17 16 14 47 360 SWITCH 9th true 21 19 18 17 48 361 SWITCH default true 21 19 18 17 49 362 TRACE all set (rwu) 17 15 15 13 23 363 TRACE no trace set 17 15 15 14 23 364 TRACE read 16 15 15 13 23 365 TRACE unset 17 15 15 14 23 366 TRACE write 17 15 15 13 23 367 UNSET catch var !exist 39 35 35 31 21 368 UNSET catch var exists 6 6 5 5 12 369 UNSET info check var !exist 5 6 5 5 13 370 UNSET info check var exists 8 8 7 7 14 371 UNSET nocomplain var !exist 5 36 34 30 22 372 UNSET nocomplain var exists 6 6 5 5 13 373 UNSET var exists 5 5 4 4 7 374 VAR 'array set' of 100 elems 168 156 155 139 243 375 VAR 100 'set's in array 89 80 79 81 233 376 VAR access global 16 16 14 12 22 377 VAR access local proc arg 5 5 5 5 18 378 VAR access locally set 5 5 5 5 17 379 VAR access upvar 20 19 17 15 24 380 VAR mset 12 16 14 14 57 381 VAR mset (foreach) 8 8 7 6 30 382 VAR ref absolute 356 337 329 269 8.0+ 383 VAR ref variable 175 163 160 139 8.0+ 384 VAR set array element 8 7 6 6 9 385 VAR set scalar 4 3 3 3 9 386 WORDCOUNT wc1 3081 2995 2962 1133 1842 387 WORDCOUNT wc2 772 1736 1741 665 1012 388 WORDCOUNT wc3 704 1646 1660 593 729 388 BENCHMARKS 1:8.4a4 2:8.3.4 3:8.2.3 4:8.0.5 5:7.6p2 FINISHED 2002-02-07 18:10:32 ---- [JH]: These are for the last set of numbers, and need updating. [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. ---- As with all benchmarks, take these numbers with a spoonful of salt!