Conversation
These tables are not mutated.
It was optimized for the x86 architecture. Modern architectures have plenty of registers, so we can use a simpler loop.
Drup
left a comment
There was a problem hiding this comment.
That's a nice optimisation! It really showcase what you can get with manually tweaked memory representation that removes some key indirections. :)
You really need to isolate the "manual memory tweak" in a submodule and document if you want anyone else to be able to come back to this code (not that many people do ... it's already a bit daunting).
Could you add to the repo your benchmarks (and show the measurements) ?
|
|
||
| (* Transition table, indexed by color. The state information is stored | ||
| at position 0. *) | ||
| type table = Table of table array [@@unboxed] |
There was a problem hiding this comment.
I think you should isolate table and state in a module, rename them (old state is now pretty much info, and new table should be named state.
Also, I would suggest adding a comment that explains you want a contiguous memory range representing state_info * table, but OCaml can't do that for you without adding an indirection, so you do it manually.
Is there any reason not to inline also idx? It is also accessed in the critical path.
There was a problem hiding this comment.
Is there any reason not to inline also
idx? It is also accessed in the critical path.
It is not on the critical path, thanks to branch prediction. The processor will speculatively execute the code as if idx >= 0, so it does not have to wait for the actual value of idx.
When executing [let st = st.next.[...]], the initial [st] is still live, so the compiler cannot reuse the register for the new value of [st] and a move instruction will have to be performed. As a hack, we add another parameter to the loop functions that contains the same value as the initial [st] and can be used afterwards. We still have a move to set this parameter, but it is no longer on the critical path.
We replace [let st = st.next.[...]] by [let st = st.[...]]. This removes one memory access on the critical path, making it twice shorter. But we now have to use [Obj.magic] to get information about the current state...
Now that the critical path is much shorter, the bottleneck becomes the number of instructions executed by loop iteration: bound checks are no longer "for free".
|
To measure performances, I use the following code, which spends most of its time traversing a string: let rec repeat n f = if n > 0 then begin f (); repeat (n - 1) f end
let () =
let len = 1000 * 1000 in
let s = String.make len 'a' in
let re = Re.Pcre.regexp "aaaaaaaaaaaaaaaaz" in
let perform () = try ignore (Re.execp re s ~pos:0) with Not_found -> () in
ignore (repeat 1000 perform)Using
So, it's about twice as fast, going from 11 cycles per character to 5.5 cycles per character. |
|
Instead of
I don’t think this is actually true. It is possible to go much faster by fetching larger chunks from memory or by performing memory accesses in parallel. Cryptographic code, for instance, often achieves less than 1 cycle per byte, despite doing significant computation. |
Signed-off-by: Rudi Grinberg <[email protected]>
Signed-off-by: Rudi Grinberg <[email protected]>
|
Rebased this in #265. Great work! |
Specifically, shrink color maps by lifting the constraint that colors represent
_contiguous_ character sets. So now, re compiles [A-Za-z] to 2 colors (one for
[A-Za-z], one for everything else), instead of 5 (the gap before A-Z, A-Z, the gap
until a-z, a-z, the gap after a-z).
The change to the number of colors can be large, as you can see in the tests with 20
colors becoming two (although IIUC the specific charset used matches on latin1, so it
seems like an api that should be deprecated in favor of charsets matching only ascii
letters, in which case the improvement would be smaller)
This is not driven by any need. I had simply implemented non-contiguous colors in a
project recently, and was surprised to see this limitation in re.
Benchmarks show compilation is somewhat slower and execution is neutral or somewhat
faster. Based on that, I'd say the change is worthwhile, but what gives me pause is:
it's possible to build regexes with much worse degradation in compilation time than the
benchmarks show (still linear in regex size, but with worse constant factors by
increasing number of boundaries * number of charsets overlapping these boundaries). I
don't know of a realistic regex that would do this, but a contrived example would be:
let expensive_color =
let re () =
List.init 127 ~f:(fun i ->
Re.diff
(Re.rg (Char.of_int_exn 0) (Char.of_int_exn 127))
(Re.char (Char.of_int_exn i)))
|> Re.seq
|> Re.compile
in
test ~name:"expensive color" re (fun re -> re ())
;;
Which takes 50us to compile before, and 1ms after, so 20x more.
Everything below is about benchmarks.
My interpretation of the benchmarks is that:
- regexes that compile quickly take significantly longer to compile in relative terms
(like +50%), but we're talking about an increase from, say, 3us to 4.5us, so I think
that's a non issue. I don't think this could be reduced either: the computation is
fundamentally harder. In such cases, the execution time ranges from neutral to -30%,
but for the most part, the absolute improvement is tiny, thus irrelevant.
- The one case where a regex that compiles quickly is run on a bigger text (the
http/ benchmark) shows something like -25% execution, thus offseting the compilation
time increase 200x over (to be clear, "execution" is first execution, not just
running through pre-existing states. No idea if that would show much improvement).
- The first slower to compile regex is the tex one, and this is one of the best cases:
+70%/+50us of compilation time, -20%/-200us of execution.
- The other slower to compile regex is "shared prefixes", whose compilation time
increases by 21us/73% for no gain of execution (because the colors are already close to
optimal, so the extra work is for naught).
An other potential benefit would be less memory consumption for transition tables in
the automata. No idea if that's significant.
Benchmarks before/after, sorted by relative difference:
name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta .
media type match/execp/ foo/bar ; charset=UTF-8 (exec) 4_513 -29% -1_319 4 -41% -2 4 -41% -2 1_921 -29% -553
media type match/exec/ foo/bar ; charset=UTF-8 (exec) 4_699 -28% -1_311 4 -46% -2 4 -46% -2 1_942 -28% -553
media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 4_672 -28% -1_294 4 -39% -1 4 -39% -1 1_944 -28% -553
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 39_594 -28% -10_955 169 -33% -56 169 -33% -56 17_611 -23% -4_060
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_285 -26% -10_398 173 -35% -60 173 -35% -60 17_641 -23% -4_060
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_125 -25% -10_153 146 -22% -32 146 -22% -32 17_643 -23% -4_060
http/manual/no group (exec) 3_351_134 -25% -831_503 83_433 -21% -17_443 82_407 -21% -17_443 750_743 -25% -184_496
uri/execp/https://google.com (exec) 21_697 -25% -5_327 66 -31% -21 66 -31% -21 10_856 -21% -2_285
http/auto/all_gen (exec) 601_617 -24% -144_548 5_907 -46% -2_694 5_907 -46% -2_694 137_350 -37% -50_261
http/manual/no group (comp+exec) 3_383_407 -24% -812_448 84_119 -21% -17_605 83_093 -21% -17_605 752_908 -24% -183_042
http/auto/execp no group (exec) 5_871_220 -24% -1_380_560 164_038 -14% -22_320 163_012 -14% -22_320 1_544_161 -24% -373_100
uri/exec/https://google.com (exec) 22_490 -23% -5_226 66 -31% -21 66 -31% -21 10_886 -21% -2_285
http/auto/execp no group (comp+exec) 5_899_317 -23% -1_364_590 165_530 -14% -23_877 164_504 -15% -23_877 1_546_883 -24% -371_646
uri/exec_opt/https://google.com (exec) 22_512 -23% -5_203 67 -32% -22 67 -32% -22 10_888 -21% -2_285
http/auto/all_gen (comp+exec) 622_097 -23% -141_110 6_467 -44% -2_858 6_467 -44% -2_858 139_848 -35% -48_806
http/manual/group (exec) 443_437 -19% -82_210 1_848 -48% -895 1_848 -48% -895 78_377 -36% -28_413
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_453 -18% -8_772 219 -33% -73 219 -33% -73 19_669 -17% -3_347
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_377 -18% -8_492 219 -33% -73 219 -33% -73 19_671 -17% -3_347
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 46_854 -18% -8_216 217 -31% -69 217 -31% -69 19_639 -17% -3_347
http/manual/group (comp+exec) 456_009 -17% -76_826 2_043 -47% -951 2_043 -47% -951 80_418 -34% -26_958
repeated sequence re (comp+exec) 195_417_983 -17% -32_910_545 11_460_627 . -8_904 8_126_215 . -8_904 42_177_429 . +21_453
repeated sequence re (exec) 171_150_613 -13% -21_558_595 11_320_086 . +7_058 7_985_674 . +7_058 42_041_416 . .
uri/exec/https://google.com (comp+exec) 29_170 -12% -3_360 97 -28% -27 97 -28% -27 12_914 -12% -1_572
uri/execp/https://google.com (comp+exec) 28_703 -11% -3_240 96 -28% -27 96 -28% -27 12_884 -12% -1_572
20 zeroes/exec/00000000000000000000 (exec) 59_782 -11% -6_630 371 -2% -7 371 -2% -7 20_700 . -21
uri/exec_opt/https://google.com (comp+exec) 29_108 -11% -3_218 97 -29% -28 97 -29% -28 12_916 -12% -1_572
tex gitignore/exec_opt (exec) 3_066_236 -11% -322_463 30_486 -7% -2_159 30_486 -7% -2_159 851_090 -9% -72_531
string traversal from ocaml#210 (comp+exec) 8_274_467 -10% -810_233 1_206 +5% +57 1_206 +5% +57 37_806 +2% +632
tex gitignore/execp (exec) 2_855_950 -9% -268_012 30_416 -7% -2_103 30_416 -7% -2_103 840_723 -9% -72_531
tex gitignore/execp (comp+exec) 3_022_509 -7% -224_179 37_570 -2% -609 37_570 -2% -609 878_399 -6% -49_871
tex gitignore/exec_opt (comp+exec) 3_188_400 -7% -226_883 37_625 -7% -2_471 37_625 -7% -2_471 888_766 -6% -49_871
memory 2:1000 175_572_565 -6% -9_964_875 9_201_714 . +45_760 9_196_840 . +45_760 40_300_656 . -1_531
20 zeroes/exec_opt/00000000000000000000 (exec) 55_978 -5% -2_716 370 . +2 370 . +2 20_702 . -21
20 zeroes/execp/00000000000000000000 (exec) 55_462 -5% -2_641 365 -1% -4 365 -1% -4 20_620 . -21
lots of a's/exec/aaaaaaaaaa .. (101) (exec) 6_190 -4% -256 3 +2% . 3 +2% . 1_887 . -5
media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 7_285 -4% -258 5 -25% -1 5 -25% -1 2_459 -7% -175
media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 7_118 -3% -228 4 -6% . 4 -6% . 2_438 -7% -175
uri/execp/file:/random_crap (exec) 10_492 -3% -333 18 +3% +1 18 +3% +1 5_128 -1% -30
20 zeroes/exec/00000000000000000000 (comp+exec) 59_969 -3% -1_837 394 +1% +4 394 +1% +4 21_520 +3% +712
lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 6_161 -3% -178 3 +11% . 3 +11% . 1_889 . -5
lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_756 -3% -161 3 +8% . 3 +8% . 1_871 . -5
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 7_256 -3% -195 4 -4% . 4 -4% . 2_461 -7% -175
string traversal from ocaml#210 (exec) 7_635_452 -2% -188_517 1_253 -19% -240 1_253 -19% -240 37_067 . -64
20 zeroes/execp/00000000000000000000 (comp+exec) 59_155 -2% -1_345 387 -13% -49 387 -13% -49 21_440 +3% +712
uri/exec_opt/file:/random_crap (exec) 10_711 -2% -194 17 +7% +1 17 +7% +1 5_151 -1% -30
20 zeroes/exec_opt/00000000000000000000 (comp+exec) 59_517 -2% -1_051 395 -3% -13 395 -3% -13 21_522 +3% +712
uri/exec/file:/random_crap (exec) 10_689 -1% -141 19 -5% -1 19 -5% -1 5_149 -1% -30
kleene star compilation (comp+exec) 81_531 -1% -676 2 +92% +2 2 +92% +2 1_247 +28% +350
memory 2:80 1_151_523 +2% +18_398 66_458 . +102 66_200 . +102 290_280 . +309
memory 2:100 1_721_811 +2% +30_899 96_826 . -123 96_568 . -123 440_020 . +269
kleene star compilation (exec) 75_526 +2% +1_359 1 -24% . 1 -24% . 933 . -3
memory 1:1000 102_761_165 +5% +5_115_898 4_816_835 . -6_566 4_811_961 . -6_566 18_863_081 . -573
memory 1:100 1_118_623 +7% +72_896 52_418 +3% +1_329 52_160 +3% +1_329 231_195 . +327
memory 1:80 673_735 +7% +44_323 24_862 +2% +473 24_604 +2% +473 157_605 . +347
memory 1:40 174_551 +8% +13_144 3_596 +2% +75 3_596 +2% +75 54_695 +1% +387
memory 2:40 233_807 +8% +19_557 7_664 +11% +809 7_664 +11% +809 86_670 . +389
split on whitespace (exec) 29_946 +9% +2_561 43 +2% +1 43 +2% +1 7_258 . -12
shared prefixes (exec) 81_629 +9% +7_117 39 . . 39 . . 13_155 . -18
memory 1:20 63_875 +9% +5_612 970 -1% -6 970 -1% -6 25_309 +2% +407
memory 2:20 74_262 +9% +6_855 1_480 -3% -46 1_480 -3% -46 32_734 +1% +429
repeated sequence re (comp) 446_678 +10% +45_188 34_998 -7% -2_421 34_998 -7% -2_421 136_175 +16% +21_453
memory 1:10 32_672 +11% +3_472 441 +1% +5 441 +1% +5 16_164 +3% +417
memory 2:10 35_086 +11% +3_795 524 +1% +5 524 +1% +5 17_764 +3% +449
uri/exec_opt/file:/random_crap (comp+exec) 17_104 +11% +1_856 35 +4% +1 35 +4% +1 7_179 +10% +683
uri/execp/file:/random_crap (comp+exec) 16_846 +11% +1_871 34 -1% . 34 -1% . 7_156 +10% +683
lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_357 +11% +958 5 +7% . 5 +7% . 2_287 +18% +409
uri/exec/file:/random_crap (comp+exec) 17_032 +12% +2_011 34 -2% -1 34 -2% -1 7_177 +10% +683
split on whitespace (comp+exec) 31_769 +14% +4_402 47 -2% -1 47 -2% -1 7_627 +4% +341
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_296 +14% +1_162 3 +57% +2 3 +57% +2 2_289 +18% +409
lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 7_915 +18% +1_423 5 +12% +1 5 +12% +1 2_271 +18% +409
shared prefixes (comp+exec) 117_673 +23% +26_637 332 +48% +160 332 +48% +160 31_140 +28% +8_666
uri/exec/https://google.com (comp) 5_426 +38% +2_038 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec/file:/random_crap (comp) 5_427 +38% +2_041 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec_opt/https://google.com (comp) 5_408 +38% +2_062 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec_opt/file:/random_crap (comp) 5_411 +39% +2_088 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_412 +39% +2_093 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/https://google.com (comp) 5_417 +39% +2_104 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_410 +39% +2_108 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/file:/random_crap (comp) 5_400 +39% +2_119 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_414 +39% +2_136 4 +34% +1 4 +34% +1 2_190 +33% +713
20 zeroes/exec/00000000000000000000 (comp) 3_077 +44% +1_361 1 x2.4 +1 1 x2.4 +1 982 +75% +733
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_182 0 +96% . 0 +96% . 679 +56% +378
media type match/execp/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_189 0 +96% . 0 +96% . 679 +56% +378
20 zeroes/exec_opt/00000000000000000000 (comp) 3_109 +49% +1_519 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/execp/00000000000000000000 (comp) 3_103 +49% +1_517 1 x2.4 +1 1 x2.4 +1 982 +75% +733
media type match/exec/ foo/bar ; charset=UTF-8 (comp) 2_526 +50% +1_268 0 x2.1 +1 0 x2.1 +1 679 +56% +378
lots of a's/exec/aaaaaaaaaa .. (101) (comp) 2_232 +50% +1_127 0 x2.6 . 0 x2.6 . 562 +74% +414
kleene star compilation (comp) 2_064 +51% +1_047 0 +65% . 0 +65% . 476 +74% +353
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 2_229 +52% +1_164 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/execp/aaaaaaaaaa .. (101) (comp) 2_235 +53% +1_187 0 x2.6 . 0 x2.6 . 562 +74% +414
split on whitespace (comp) 2_123 +57% +1_200 0 x3.1 . 0 x3.1 . 531 +66% +353
string traversal from ocaml#210 (comp) 2_954 +57% +1_682 1 +90% +1 1 +90% +1 901 +77% +696
tex gitignore/exec_opt (comp) 87_067 +63% +54_634 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
tex gitignore/execp (comp) 87_089 +63% +54_728 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
http/auto/execp no group (comp) 6_989 +68% +4_782 8 +55% +5 8 +55% +5 2_884 +50% +1_454
http/manual/no group (comp) 6_519 +70% +4_552 5 +89% +5 5 +89% +5 2_327 +62% +1_454
http/auto/all_gen (comp) 6_683 +71% +4_739 7 +74% +5 7 +74% +5 2_660 +55% +1_455
shared prefixes (comp) 29_595 +73% +21_667 201 +74% +148 201 +74% +148 18_147 +48% +8_684
http/manual/group (comp) 6_184 +76% +4_696 5 +99% +5 5 +99% +5 2_203 +66% +1_455
Same thing, but sorted by name:
name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta .
20 zeroes/exec/00000000000000000000 (comp) 3_077 +44% +1_361 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/exec/00000000000000000000 (comp+exec) 59_969 -3% -1_837 394 +1% +4 394 +1% +4 21_520 +3% +712
20 zeroes/exec/00000000000000000000 (exec) 59_782 -11% -6_630 371 -2% -7 371 -2% -7 20_700 . -21
20 zeroes/exec_opt/00000000000000000000 (comp) 3_109 +49% +1_519 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/exec_opt/00000000000000000000 (comp+exec) 59_517 -2% -1_051 395 -3% -13 395 -3% -13 21_522 +3% +712
20 zeroes/exec_opt/00000000000000000000 (exec) 55_978 -5% -2_716 370 . +2 370 . +2 20_702 . -21
20 zeroes/execp/00000000000000000000 (comp) 3_103 +49% +1_517 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/execp/00000000000000000000 (comp+exec) 59_155 -2% -1_345 387 -13% -49 387 -13% -49 21_440 +3% +712
20 zeroes/execp/00000000000000000000 (exec) 55_462 -5% -2_641 365 -1% -4 365 -1% -4 20_620 . -21
http/auto/all_gen (comp) 6_683 +71% +4_739 7 +74% +5 7 +74% +5 2_660 +55% +1_455
http/auto/all_gen (comp+exec) 622_097 -23% -141_110 6_467 -44% -2_858 6_467 -44% -2_858 139_848 -35% -48_806
http/auto/all_gen (exec) 601_617 -24% -144_548 5_907 -46% -2_694 5_907 -46% -2_694 137_350 -37% -50_261
http/auto/execp no group (comp) 6_989 +68% +4_782 8 +55% +5 8 +55% +5 2_884 +50% +1_454
http/auto/execp no group (comp+exec) 5_899_317 -23% -1_364_590 165_530 -14% -23_877 164_504 -15% -23_877 1_546_883 -24% -371_646
http/auto/execp no group (exec) 5_871_220 -24% -1_380_560 164_038 -14% -22_320 163_012 -14% -22_320 1_544_161 -24% -373_100
http/manual/group (comp) 6_184 +76% +4_696 5 +99% +5 5 +99% +5 2_203 +66% +1_455
http/manual/group (comp+exec) 456_009 -17% -76_826 2_043 -47% -951 2_043 -47% -951 80_418 -34% -26_958
http/manual/group (exec) 443_437 -19% -82_210 1_848 -48% -895 1_848 -48% -895 78_377 -36% -28_413
http/manual/no group (comp) 6_519 +70% +4_552 5 +89% +5 5 +89% +5 2_327 +62% +1_454
http/manual/no group (comp+exec) 3_383_407 -24% -812_448 84_119 -21% -17_605 83_093 -21% -17_605 752_908 -24% -183_042
http/manual/no group (exec) 3_351_134 -25% -831_503 83_433 -21% -17_443 82_407 -21% -17_443 750_743 -25% -184_496
kleene star compilation (comp) 2_064 +51% +1_047 0 +65% . 0 +65% . 476 +74% +353
kleene star compilation (comp+exec) 81_531 -1% -676 2 +92% +2 2 +92% +2 1_247 +28% +350
kleene star compilation (exec) 75_526 +2% +1_359 1 -24% . 1 -24% . 933 . -3
lots of a's/exec/aaaaaaaaaa .. (101) (comp) 2_232 +50% +1_127 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_357 +11% +958 5 +7% . 5 +7% . 2_287 +18% +409
lots of a's/exec/aaaaaaaaaa .. (101) (exec) 6_190 -4% -256 3 +2% . 3 +2% . 1_887 . -5
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 2_229 +52% +1_164 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_296 +14% +1_162 3 +57% +2 3 +57% +2 2_289 +18% +409
lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 6_161 -3% -178 3 +11% . 3 +11% . 1_889 . -5
lots of a's/execp/aaaaaaaaaa .. (101) (comp) 2_235 +53% +1_187 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 7_915 +18% +1_423 5 +12% +1 5 +12% +1 2_271 +18% +409
lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_756 -3% -161 3 +8% . 3 +8% . 1_871 . -5
media type match/exec/ foo/bar ; charset=UTF-8 (comp) 2_526 +50% +1_268 0 x2.1 +1 0 x2.1 +1 679 +56% +378
media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 7_285 -4% -258 5 -25% -1 5 -25% -1 2_459 -7% -175
media type match/exec/ foo/bar ; charset=UTF-8 (exec) 4_699 -28% -1_311 4 -46% -2 4 -46% -2 1_942 -28% -553
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_182 0 +96% . 0 +96% . 679 +56% +378
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 7_256 -3% -195 4 -4% . 4 -4% . 2_461 -7% -175
media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 4_672 -28% -1_294 4 -39% -1 4 -39% -1 1_944 -28% -553
media type match/execp/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_189 0 +96% . 0 +96% . 679 +56% +378
media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 7_118 -3% -228 4 -6% . 4 -6% . 2_438 -7% -175
media type match/execp/ foo/bar ; charset=UTF-8 (exec) 4_513 -29% -1_319 4 -41% -2 4 -41% -2 1_921 -29% -553
memory 1:10 32_672 +11% +3_472 441 +1% +5 441 +1% +5 16_164 +3% +417
memory 1:100 1_118_623 +7% +72_896 52_418 +3% +1_329 52_160 +3% +1_329 231_195 . +327
memory 1:1000 102_761_165 +5% +5_115_898 4_816_835 . -6_566 4_811_961 . -6_566 18_863_081 . -573
memory 1:20 63_875 +9% +5_612 970 -1% -6 970 -1% -6 25_309 +2% +407
memory 1:40 174_551 +8% +13_144 3_596 +2% +75 3_596 +2% +75 54_695 +1% +387
memory 1:80 673_735 +7% +44_323 24_862 +2% +473 24_604 +2% +473 157_605 . +347
memory 2:10 35_086 +11% +3_795 524 +1% +5 524 +1% +5 17_764 +3% +449
memory 2:100 1_721_811 +2% +30_899 96_826 . -123 96_568 . -123 440_020 . +269
memory 2:1000 175_572_565 -6% -9_964_875 9_201_714 . +45_760 9_196_840 . +45_760 40_300_656 . -1_531
memory 2:20 74_262 +9% +6_855 1_480 -3% -46 1_480 -3% -46 32_734 +1% +429
memory 2:40 233_807 +8% +19_557 7_664 +11% +809 7_664 +11% +809 86_670 . +389
memory 2:80 1_151_523 +2% +18_398 66_458 . +102 66_200 . +102 290_280 . +309
repeated sequence re (comp) 446_678 +10% +45_188 34_998 -7% -2_421 34_998 -7% -2_421 136_175 +16% +21_453
repeated sequence re (comp+exec) 195_417_983 -17% -32_910_545 11_460_627 . -8_904 8_126_215 . -8_904 42_177_429 . +21_453
repeated sequence re (exec) 171_150_613 -13% -21_558_595 11_320_086 . +7_058 7_985_674 . +7_058 42_041_416 . .
shared prefixes (comp) 29_595 +73% +21_667 201 +74% +148 201 +74% +148 18_147 +48% +8_684
shared prefixes (comp+exec) 117_673 +23% +26_637 332 +48% +160 332 +48% +160 31_140 +28% +8_666
shared prefixes (exec) 81_629 +9% +7_117 39 . . 39 . . 13_155 . -18
split on whitespace (comp) 2_123 +57% +1_200 0 x3.1 . 0 x3.1 . 531 +66% +353
split on whitespace (comp+exec) 31_769 +14% +4_402 47 -2% -1 47 -2% -1 7_627 +4% +341
split on whitespace (exec) 29_946 +9% +2_561 43 +2% +1 43 +2% +1 7_258 . -12
string traversal from ocaml#210 (comp) 2_954 +57% +1_682 1 +90% +1 1 +90% +1 901 +77% +696
string traversal from ocaml#210 (comp+exec) 8_274_467 -10% -810_233 1_206 +5% +57 1_206 +5% +57 37_806 +2% +632
string traversal from ocaml#210 (exec) 7_635_452 -2% -188_517 1_253 -19% -240 1_253 -19% -240 37_067 . -64
tex gitignore/exec_opt (comp) 87_067 +63% +54_634 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
tex gitignore/exec_opt (comp+exec) 3_188_400 -7% -226_883 37_625 -7% -2_471 37_625 -7% -2_471 888_766 -6% -49_871
tex gitignore/exec_opt (exec) 3_066_236 -11% -322_463 30_486 -7% -2_159 30_486 -7% -2_159 851_090 -9% -72_531
tex gitignore/execp (comp) 87_089 +63% +54_728 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
tex gitignore/execp (comp+exec) 3_022_509 -7% -224_179 37_570 -2% -609 37_570 -2% -609 878_399 -6% -49_871
tex gitignore/execp (exec) 2_855_950 -9% -268_012 30_416 -7% -2_103 30_416 -7% -2_103 840_723 -9% -72_531
uri/exec/file:/random_crap (comp) 5_427 +38% +2_041 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec/file:/random_crap (comp+exec) 17_032 +12% +2_011 34 -2% -1 34 -2% -1 7_177 +10% +683
uri/exec/file:/random_crap (exec) 10_689 -1% -141 19 -5% -1 19 -5% -1 5_149 -1% -30
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_412 +39% +2_093 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_453 -18% -8_772 219 -33% -73 219 -33% -73 19_669 -17% -3_347
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_285 -26% -10_398 173 -35% -60 173 -35% -60 17_641 -23% -4_060
uri/exec/https://google.com (comp) 5_426 +38% +2_038 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec/https://google.com (comp+exec) 29_170 -12% -3_360 97 -28% -27 97 -28% -27 12_914 -12% -1_572
uri/exec/https://google.com (exec) 22_490 -23% -5_226 66 -31% -21 66 -31% -21 10_886 -21% -2_285
uri/exec_opt/file:/random_crap (comp) 5_411 +39% +2_088 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec_opt/file:/random_crap (comp+exec) 17_104 +11% +1_856 35 +4% +1 35 +4% +1 7_179 +10% +683
uri/exec_opt/file:/random_crap (exec) 10_711 -2% -194 17 +7% +1 17 +7% +1 5_151 -1% -30
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_410 +39% +2_108 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_377 -18% -8_492 219 -33% -73 219 -33% -73 19_671 -17% -3_347
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_125 -25% -10_153 146 -22% -32 146 -22% -32 17_643 -23% -4_060
uri/exec_opt/https://google.com (comp) 5_408 +38% +2_062 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec_opt/https://google.com (comp+exec) 29_108 -11% -3_218 97 -29% -28 97 -29% -28 12_916 -12% -1_572
uri/exec_opt/https://google.com (exec) 22_512 -23% -5_203 67 -32% -22 67 -32% -22 10_888 -21% -2_285
uri/execp/file:/random_crap (comp) 5_400 +39% +2_119 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/file:/random_crap (comp+exec) 16_846 +11% +1_871 34 -1% . 34 -1% . 7_156 +10% +683
uri/execp/file:/random_crap (exec) 10_492 -3% -333 18 +3% +1 18 +3% +1 5_128 -1% -30
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_414 +39% +2_136 4 +34% +1 4 +34% +1 2_190 +33% +713
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 46_854 -18% -8_216 217 -31% -69 217 -31% -69 19_639 -17% -3_347
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 39_594 -28% -10_955 169 -33% -56 169 -33% -56 17_611 -23% -4_060
uri/execp/https://google.com (comp) 5_417 +39% +2_104 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/https://google.com (comp+exec) 28_703 -11% -3_240 96 -28% -27 96 -28% -27 12_884 -12% -1_572
uri/execp/https://google.com (exec) 21_697 -25% -5_327 66 -31% -21 66 -31% -21 10_856 -21% -2_285
Specifically, shrink color maps by lifting the constraint that colors represent
_contiguous_ character sets. So now, re compiles [A-Za-z] to 2 colors (one for
[A-Za-z], one for everything else), instead of 5 (the gap before A-Z, A-Z, the gap
until a-z, a-z, the gap after a-z).
The change to the number of colors can be large, as you can see in the tests with 20
colors becoming two (although IIUC the specific charset used matches on latin1, so it
seems like an api that should be deprecated in favor of charsets matching only ascii
letters, in which case the improvement would be smaller)
This is not driven by any need. I had simply implemented non-contiguous colors in a
project recently, and was surprised to see this limitation in re.
Benchmarks show compilation is somewhat slower and execution is neutral or somewhat
faster. Based on that, I'd say the change is worthwhile, but what gives me pause is:
it's possible to build regexes with much worse degradation in compilation time than the
benchmarks show (still linear in regex size, but with worse constant factors by
increasing number of boundaries * number of charsets overlapping these boundaries). I
don't know of a realistic regex that would do this, but a contrived example would be:
let expensive_color =
let re () =
List.init 127 ~f:(fun i ->
Re.diff
(Re.rg (Char.of_int_exn 0) (Char.of_int_exn 127))
(Re.char (Char.of_int_exn i)))
|> Re.seq
|> Re.compile
in
test ~name:"expensive color" re (fun re -> re ())
;;
Which takes 50us to compile before, and 1ms after, so 20x more.
Everything below is about benchmarks.
My interpretation of the benchmarks is that:
- regexes that compile quickly take significantly longer to compile in relative terms
(like +50%), but we're talking about an increase from, say, 3us to 4.5us, so I think
that's a non issue. I don't think this could be reduced either: the computation is
fundamentally harder. In such cases, the execution time ranges from neutral to -30%,
but for the most part, the absolute improvement is tiny, thus irrelevant.
- The one case where a regex that compiles quickly is run on a bigger text (the
http/ benchmark) shows something like -25% execution, thus offseting the compilation
time increase 200x over (to be clear, "execution" is first execution, not just
running through pre-existing states. No idea if that would show much improvement).
- The first slower to compile regex is the tex one, and this is one of the best cases:
+70%/+50us of compilation time, -20%/-200us of execution.
- The other slower to compile regex is "shared prefixes", whose compilation time
increases by 21us/73% for no gain of execution (because the colors are already close to
optimal, so the extra work is for naught).
An other potential benefit would be less memory consumption for transition tables in
the automata. No idea if that's significant.
Benchmarks before/after, sorted by relative difference:
name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta .
media type match/execp/ foo/bar ; charset=UTF-8 (exec) 4_513 -29% -1_319 4 -41% -2 4 -41% -2 1_921 -29% -553
media type match/exec/ foo/bar ; charset=UTF-8 (exec) 4_699 -28% -1_311 4 -46% -2 4 -46% -2 1_942 -28% -553
media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 4_672 -28% -1_294 4 -39% -1 4 -39% -1 1_944 -28% -553
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 39_594 -28% -10_955 169 -33% -56 169 -33% -56 17_611 -23% -4_060
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_285 -26% -10_398 173 -35% -60 173 -35% -60 17_641 -23% -4_060
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_125 -25% -10_153 146 -22% -32 146 -22% -32 17_643 -23% -4_060
http/manual/no group (exec) 3_351_134 -25% -831_503 83_433 -21% -17_443 82_407 -21% -17_443 750_743 -25% -184_496
uri/execp/https://google.com (exec) 21_697 -25% -5_327 66 -31% -21 66 -31% -21 10_856 -21% -2_285
http/auto/all_gen (exec) 601_617 -24% -144_548 5_907 -46% -2_694 5_907 -46% -2_694 137_350 -37% -50_261
http/manual/no group (comp+exec) 3_383_407 -24% -812_448 84_119 -21% -17_605 83_093 -21% -17_605 752_908 -24% -183_042
http/auto/execp no group (exec) 5_871_220 -24% -1_380_560 164_038 -14% -22_320 163_012 -14% -22_320 1_544_161 -24% -373_100
uri/exec/https://google.com (exec) 22_490 -23% -5_226 66 -31% -21 66 -31% -21 10_886 -21% -2_285
http/auto/execp no group (comp+exec) 5_899_317 -23% -1_364_590 165_530 -14% -23_877 164_504 -15% -23_877 1_546_883 -24% -371_646
uri/exec_opt/https://google.com (exec) 22_512 -23% -5_203 67 -32% -22 67 -32% -22 10_888 -21% -2_285
http/auto/all_gen (comp+exec) 622_097 -23% -141_110 6_467 -44% -2_858 6_467 -44% -2_858 139_848 -35% -48_806
http/manual/group (exec) 443_437 -19% -82_210 1_848 -48% -895 1_848 -48% -895 78_377 -36% -28_413
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_453 -18% -8_772 219 -33% -73 219 -33% -73 19_669 -17% -3_347
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_377 -18% -8_492 219 -33% -73 219 -33% -73 19_671 -17% -3_347
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 46_854 -18% -8_216 217 -31% -69 217 -31% -69 19_639 -17% -3_347
http/manual/group (comp+exec) 456_009 -17% -76_826 2_043 -47% -951 2_043 -47% -951 80_418 -34% -26_958
repeated sequence re (comp+exec) 195_417_983 -17% -32_910_545 11_460_627 . -8_904 8_126_215 . -8_904 42_177_429 . +21_453
repeated sequence re (exec) 171_150_613 -13% -21_558_595 11_320_086 . +7_058 7_985_674 . +7_058 42_041_416 . .
uri/exec/https://google.com (comp+exec) 29_170 -12% -3_360 97 -28% -27 97 -28% -27 12_914 -12% -1_572
uri/execp/https://google.com (comp+exec) 28_703 -11% -3_240 96 -28% -27 96 -28% -27 12_884 -12% -1_572
20 zeroes/exec/00000000000000000000 (exec) 59_782 -11% -6_630 371 -2% -7 371 -2% -7 20_700 . -21
uri/exec_opt/https://google.com (comp+exec) 29_108 -11% -3_218 97 -29% -28 97 -29% -28 12_916 -12% -1_572
tex gitignore/exec_opt (exec) 3_066_236 -11% -322_463 30_486 -7% -2_159 30_486 -7% -2_159 851_090 -9% -72_531
string traversal from ocaml#210 (comp+exec) 8_274_467 -10% -810_233 1_206 +5% +57 1_206 +5% +57 37_806 +2% +632
tex gitignore/execp (exec) 2_855_950 -9% -268_012 30_416 -7% -2_103 30_416 -7% -2_103 840_723 -9% -72_531
tex gitignore/execp (comp+exec) 3_022_509 -7% -224_179 37_570 -2% -609 37_570 -2% -609 878_399 -6% -49_871
tex gitignore/exec_opt (comp+exec) 3_188_400 -7% -226_883 37_625 -7% -2_471 37_625 -7% -2_471 888_766 -6% -49_871
memory 2:1000 175_572_565 -6% -9_964_875 9_201_714 . +45_760 9_196_840 . +45_760 40_300_656 . -1_531
20 zeroes/exec_opt/00000000000000000000 (exec) 55_978 -5% -2_716 370 . +2 370 . +2 20_702 . -21
20 zeroes/execp/00000000000000000000 (exec) 55_462 -5% -2_641 365 -1% -4 365 -1% -4 20_620 . -21
lots of a's/exec/aaaaaaaaaa .. (101) (exec) 6_190 -4% -256 3 +2% . 3 +2% . 1_887 . -5
media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 7_285 -4% -258 5 -25% -1 5 -25% -1 2_459 -7% -175
media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 7_118 -3% -228 4 -6% . 4 -6% . 2_438 -7% -175
uri/execp/file:/random_crap (exec) 10_492 -3% -333 18 +3% +1 18 +3% +1 5_128 -1% -30
20 zeroes/exec/00000000000000000000 (comp+exec) 59_969 -3% -1_837 394 +1% +4 394 +1% +4 21_520 +3% +712
lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 6_161 -3% -178 3 +11% . 3 +11% . 1_889 . -5
lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_756 -3% -161 3 +8% . 3 +8% . 1_871 . -5
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 7_256 -3% -195 4 -4% . 4 -4% . 2_461 -7% -175
string traversal from ocaml#210 (exec) 7_635_452 -2% -188_517 1_253 -19% -240 1_253 -19% -240 37_067 . -64
20 zeroes/execp/00000000000000000000 (comp+exec) 59_155 -2% -1_345 387 -13% -49 387 -13% -49 21_440 +3% +712
uri/exec_opt/file:/random_crap (exec) 10_711 -2% -194 17 +7% +1 17 +7% +1 5_151 -1% -30
20 zeroes/exec_opt/00000000000000000000 (comp+exec) 59_517 -2% -1_051 395 -3% -13 395 -3% -13 21_522 +3% +712
uri/exec/file:/random_crap (exec) 10_689 -1% -141 19 -5% -1 19 -5% -1 5_149 -1% -30
kleene star compilation (comp+exec) 81_531 -1% -676 2 +92% +2 2 +92% +2 1_247 +28% +350
memory 2:80 1_151_523 +2% +18_398 66_458 . +102 66_200 . +102 290_280 . +309
memory 2:100 1_721_811 +2% +30_899 96_826 . -123 96_568 . -123 440_020 . +269
kleene star compilation (exec) 75_526 +2% +1_359 1 -24% . 1 -24% . 933 . -3
memory 1:1000 102_761_165 +5% +5_115_898 4_816_835 . -6_566 4_811_961 . -6_566 18_863_081 . -573
memory 1:100 1_118_623 +7% +72_896 52_418 +3% +1_329 52_160 +3% +1_329 231_195 . +327
memory 1:80 673_735 +7% +44_323 24_862 +2% +473 24_604 +2% +473 157_605 . +347
memory 1:40 174_551 +8% +13_144 3_596 +2% +75 3_596 +2% +75 54_695 +1% +387
memory 2:40 233_807 +8% +19_557 7_664 +11% +809 7_664 +11% +809 86_670 . +389
split on whitespace (exec) 29_946 +9% +2_561 43 +2% +1 43 +2% +1 7_258 . -12
shared prefixes (exec) 81_629 +9% +7_117 39 . . 39 . . 13_155 . -18
memory 1:20 63_875 +9% +5_612 970 -1% -6 970 -1% -6 25_309 +2% +407
memory 2:20 74_262 +9% +6_855 1_480 -3% -46 1_480 -3% -46 32_734 +1% +429
repeated sequence re (comp) 446_678 +10% +45_188 34_998 -7% -2_421 34_998 -7% -2_421 136_175 +16% +21_453
memory 1:10 32_672 +11% +3_472 441 +1% +5 441 +1% +5 16_164 +3% +417
memory 2:10 35_086 +11% +3_795 524 +1% +5 524 +1% +5 17_764 +3% +449
uri/exec_opt/file:/random_crap (comp+exec) 17_104 +11% +1_856 35 +4% +1 35 +4% +1 7_179 +10% +683
uri/execp/file:/random_crap (comp+exec) 16_846 +11% +1_871 34 -1% . 34 -1% . 7_156 +10% +683
lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_357 +11% +958 5 +7% . 5 +7% . 2_287 +18% +409
uri/exec/file:/random_crap (comp+exec) 17_032 +12% +2_011 34 -2% -1 34 -2% -1 7_177 +10% +683
split on whitespace (comp+exec) 31_769 +14% +4_402 47 -2% -1 47 -2% -1 7_627 +4% +341
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_296 +14% +1_162 3 +57% +2 3 +57% +2 2_289 +18% +409
lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 7_915 +18% +1_423 5 +12% +1 5 +12% +1 2_271 +18% +409
shared prefixes (comp+exec) 117_673 +23% +26_637 332 +48% +160 332 +48% +160 31_140 +28% +8_666
uri/exec/https://google.com (comp) 5_426 +38% +2_038 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec/file:/random_crap (comp) 5_427 +38% +2_041 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec_opt/https://google.com (comp) 5_408 +38% +2_062 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec_opt/file:/random_crap (comp) 5_411 +39% +2_088 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_412 +39% +2_093 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/https://google.com (comp) 5_417 +39% +2_104 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_410 +39% +2_108 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/file:/random_crap (comp) 5_400 +39% +2_119 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_414 +39% +2_136 4 +34% +1 4 +34% +1 2_190 +33% +713
20 zeroes/exec/00000000000000000000 (comp) 3_077 +44% +1_361 1 x2.4 +1 1 x2.4 +1 982 +75% +733
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_182 0 +96% . 0 +96% . 679 +56% +378
media type match/execp/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_189 0 +96% . 0 +96% . 679 +56% +378
20 zeroes/exec_opt/00000000000000000000 (comp) 3_109 +49% +1_519 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/execp/00000000000000000000 (comp) 3_103 +49% +1_517 1 x2.4 +1 1 x2.4 +1 982 +75% +733
media type match/exec/ foo/bar ; charset=UTF-8 (comp) 2_526 +50% +1_268 0 x2.1 +1 0 x2.1 +1 679 +56% +378
lots of a's/exec/aaaaaaaaaa .. (101) (comp) 2_232 +50% +1_127 0 x2.6 . 0 x2.6 . 562 +74% +414
kleene star compilation (comp) 2_064 +51% +1_047 0 +65% . 0 +65% . 476 +74% +353
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 2_229 +52% +1_164 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/execp/aaaaaaaaaa .. (101) (comp) 2_235 +53% +1_187 0 x2.6 . 0 x2.6 . 562 +74% +414
split on whitespace (comp) 2_123 +57% +1_200 0 x3.1 . 0 x3.1 . 531 +66% +353
string traversal from ocaml#210 (comp) 2_954 +57% +1_682 1 +90% +1 1 +90% +1 901 +77% +696
tex gitignore/exec_opt (comp) 87_067 +63% +54_634 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
tex gitignore/execp (comp) 87_089 +63% +54_728 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
http/auto/execp no group (comp) 6_989 +68% +4_782 8 +55% +5 8 +55% +5 2_884 +50% +1_454
http/manual/no group (comp) 6_519 +70% +4_552 5 +89% +5 5 +89% +5 2_327 +62% +1_454
http/auto/all_gen (comp) 6_683 +71% +4_739 7 +74% +5 7 +74% +5 2_660 +55% +1_455
shared prefixes (comp) 29_595 +73% +21_667 201 +74% +148 201 +74% +148 18_147 +48% +8_684
http/manual/group (comp) 6_184 +76% +4_696 5 +99% +5 5 +99% +5 2_203 +66% +1_455
Same thing, but sorted by name:
name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta .
20 zeroes/exec/00000000000000000000 (comp) 3_077 +44% +1_361 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/exec/00000000000000000000 (comp+exec) 59_969 -3% -1_837 394 +1% +4 394 +1% +4 21_520 +3% +712
20 zeroes/exec/00000000000000000000 (exec) 59_782 -11% -6_630 371 -2% -7 371 -2% -7 20_700 . -21
20 zeroes/exec_opt/00000000000000000000 (comp) 3_109 +49% +1_519 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/exec_opt/00000000000000000000 (comp+exec) 59_517 -2% -1_051 395 -3% -13 395 -3% -13 21_522 +3% +712
20 zeroes/exec_opt/00000000000000000000 (exec) 55_978 -5% -2_716 370 . +2 370 . +2 20_702 . -21
20 zeroes/execp/00000000000000000000 (comp) 3_103 +49% +1_517 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/execp/00000000000000000000 (comp+exec) 59_155 -2% -1_345 387 -13% -49 387 -13% -49 21_440 +3% +712
20 zeroes/execp/00000000000000000000 (exec) 55_462 -5% -2_641 365 -1% -4 365 -1% -4 20_620 . -21
http/auto/all_gen (comp) 6_683 +71% +4_739 7 +74% +5 7 +74% +5 2_660 +55% +1_455
http/auto/all_gen (comp+exec) 622_097 -23% -141_110 6_467 -44% -2_858 6_467 -44% -2_858 139_848 -35% -48_806
http/auto/all_gen (exec) 601_617 -24% -144_548 5_907 -46% -2_694 5_907 -46% -2_694 137_350 -37% -50_261
http/auto/execp no group (comp) 6_989 +68% +4_782 8 +55% +5 8 +55% +5 2_884 +50% +1_454
http/auto/execp no group (comp+exec) 5_899_317 -23% -1_364_590 165_530 -14% -23_877 164_504 -15% -23_877 1_546_883 -24% -371_646
http/auto/execp no group (exec) 5_871_220 -24% -1_380_560 164_038 -14% -22_320 163_012 -14% -22_320 1_544_161 -24% -373_100
http/manual/group (comp) 6_184 +76% +4_696 5 +99% +5 5 +99% +5 2_203 +66% +1_455
http/manual/group (comp+exec) 456_009 -17% -76_826 2_043 -47% -951 2_043 -47% -951 80_418 -34% -26_958
http/manual/group (exec) 443_437 -19% -82_210 1_848 -48% -895 1_848 -48% -895 78_377 -36% -28_413
http/manual/no group (comp) 6_519 +70% +4_552 5 +89% +5 5 +89% +5 2_327 +62% +1_454
http/manual/no group (comp+exec) 3_383_407 -24% -812_448 84_119 -21% -17_605 83_093 -21% -17_605 752_908 -24% -183_042
http/manual/no group (exec) 3_351_134 -25% -831_503 83_433 -21% -17_443 82_407 -21% -17_443 750_743 -25% -184_496
kleene star compilation (comp) 2_064 +51% +1_047 0 +65% . 0 +65% . 476 +74% +353
kleene star compilation (comp+exec) 81_531 -1% -676 2 +92% +2 2 +92% +2 1_247 +28% +350
kleene star compilation (exec) 75_526 +2% +1_359 1 -24% . 1 -24% . 933 . -3
lots of a's/exec/aaaaaaaaaa .. (101) (comp) 2_232 +50% +1_127 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_357 +11% +958 5 +7% . 5 +7% . 2_287 +18% +409
lots of a's/exec/aaaaaaaaaa .. (101) (exec) 6_190 -4% -256 3 +2% . 3 +2% . 1_887 . -5
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 2_229 +52% +1_164 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_296 +14% +1_162 3 +57% +2 3 +57% +2 2_289 +18% +409
lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 6_161 -3% -178 3 +11% . 3 +11% . 1_889 . -5
lots of a's/execp/aaaaaaaaaa .. (101) (comp) 2_235 +53% +1_187 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 7_915 +18% +1_423 5 +12% +1 5 +12% +1 2_271 +18% +409
lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_756 -3% -161 3 +8% . 3 +8% . 1_871 . -5
media type match/exec/ foo/bar ; charset=UTF-8 (comp) 2_526 +50% +1_268 0 x2.1 +1 0 x2.1 +1 679 +56% +378
media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 7_285 -4% -258 5 -25% -1 5 -25% -1 2_459 -7% -175
media type match/exec/ foo/bar ; charset=UTF-8 (exec) 4_699 -28% -1_311 4 -46% -2 4 -46% -2 1_942 -28% -553
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_182 0 +96% . 0 +96% . 679 +56% +378
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 7_256 -3% -195 4 -4% . 4 -4% . 2_461 -7% -175
media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 4_672 -28% -1_294 4 -39% -1 4 -39% -1 1_944 -28% -553
media type match/execp/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_189 0 +96% . 0 +96% . 679 +56% +378
media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 7_118 -3% -228 4 -6% . 4 -6% . 2_438 -7% -175
media type match/execp/ foo/bar ; charset=UTF-8 (exec) 4_513 -29% -1_319 4 -41% -2 4 -41% -2 1_921 -29% -553
memory 1:10 32_672 +11% +3_472 441 +1% +5 441 +1% +5 16_164 +3% +417
memory 1:100 1_118_623 +7% +72_896 52_418 +3% +1_329 52_160 +3% +1_329 231_195 . +327
memory 1:1000 102_761_165 +5% +5_115_898 4_816_835 . -6_566 4_811_961 . -6_566 18_863_081 . -573
memory 1:20 63_875 +9% +5_612 970 -1% -6 970 -1% -6 25_309 +2% +407
memory 1:40 174_551 +8% +13_144 3_596 +2% +75 3_596 +2% +75 54_695 +1% +387
memory 1:80 673_735 +7% +44_323 24_862 +2% +473 24_604 +2% +473 157_605 . +347
memory 2:10 35_086 +11% +3_795 524 +1% +5 524 +1% +5 17_764 +3% +449
memory 2:100 1_721_811 +2% +30_899 96_826 . -123 96_568 . -123 440_020 . +269
memory 2:1000 175_572_565 -6% -9_964_875 9_201_714 . +45_760 9_196_840 . +45_760 40_300_656 . -1_531
memory 2:20 74_262 +9% +6_855 1_480 -3% -46 1_480 -3% -46 32_734 +1% +429
memory 2:40 233_807 +8% +19_557 7_664 +11% +809 7_664 +11% +809 86_670 . +389
memory 2:80 1_151_523 +2% +18_398 66_458 . +102 66_200 . +102 290_280 . +309
repeated sequence re (comp) 446_678 +10% +45_188 34_998 -7% -2_421 34_998 -7% -2_421 136_175 +16% +21_453
repeated sequence re (comp+exec) 195_417_983 -17% -32_910_545 11_460_627 . -8_904 8_126_215 . -8_904 42_177_429 . +21_453
repeated sequence re (exec) 171_150_613 -13% -21_558_595 11_320_086 . +7_058 7_985_674 . +7_058 42_041_416 . .
shared prefixes (comp) 29_595 +73% +21_667 201 +74% +148 201 +74% +148 18_147 +48% +8_684
shared prefixes (comp+exec) 117_673 +23% +26_637 332 +48% +160 332 +48% +160 31_140 +28% +8_666
shared prefixes (exec) 81_629 +9% +7_117 39 . . 39 . . 13_155 . -18
split on whitespace (comp) 2_123 +57% +1_200 0 x3.1 . 0 x3.1 . 531 +66% +353
split on whitespace (comp+exec) 31_769 +14% +4_402 47 -2% -1 47 -2% -1 7_627 +4% +341
split on whitespace (exec) 29_946 +9% +2_561 43 +2% +1 43 +2% +1 7_258 . -12
string traversal from ocaml#210 (comp) 2_954 +57% +1_682 1 +90% +1 1 +90% +1 901 +77% +696
string traversal from ocaml#210 (comp+exec) 8_274_467 -10% -810_233 1_206 +5% +57 1_206 +5% +57 37_806 +2% +632
string traversal from ocaml#210 (exec) 7_635_452 -2% -188_517 1_253 -19% -240 1_253 -19% -240 37_067 . -64
tex gitignore/exec_opt (comp) 87_067 +63% +54_634 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
tex gitignore/exec_opt (comp+exec) 3_188_400 -7% -226_883 37_625 -7% -2_471 37_625 -7% -2_471 888_766 -6% -49_871
tex gitignore/exec_opt (exec) 3_066_236 -11% -322_463 30_486 -7% -2_159 30_486 -7% -2_159 851_090 -9% -72_531
tex gitignore/execp (comp) 87_089 +63% +54_728 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
tex gitignore/execp (comp+exec) 3_022_509 -7% -224_179 37_570 -2% -609 37_570 -2% -609 878_399 -6% -49_871
tex gitignore/execp (exec) 2_855_950 -9% -268_012 30_416 -7% -2_103 30_416 -7% -2_103 840_723 -9% -72_531
uri/exec/file:/random_crap (comp) 5_427 +38% +2_041 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec/file:/random_crap (comp+exec) 17_032 +12% +2_011 34 -2% -1 34 -2% -1 7_177 +10% +683
uri/exec/file:/random_crap (exec) 10_689 -1% -141 19 -5% -1 19 -5% -1 5_149 -1% -30
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_412 +39% +2_093 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_453 -18% -8_772 219 -33% -73 219 -33% -73 19_669 -17% -3_347
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_285 -26% -10_398 173 -35% -60 173 -35% -60 17_641 -23% -4_060
uri/exec/https://google.com (comp) 5_426 +38% +2_038 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec/https://google.com (comp+exec) 29_170 -12% -3_360 97 -28% -27 97 -28% -27 12_914 -12% -1_572
uri/exec/https://google.com (exec) 22_490 -23% -5_226 66 -31% -21 66 -31% -21 10_886 -21% -2_285
uri/exec_opt/file:/random_crap (comp) 5_411 +39% +2_088 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec_opt/file:/random_crap (comp+exec) 17_104 +11% +1_856 35 +4% +1 35 +4% +1 7_179 +10% +683
uri/exec_opt/file:/random_crap (exec) 10_711 -2% -194 17 +7% +1 17 +7% +1 5_151 -1% -30
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_410 +39% +2_108 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_377 -18% -8_492 219 -33% -73 219 -33% -73 19_671 -17% -3_347
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_125 -25% -10_153 146 -22% -32 146 -22% -32 17_643 -23% -4_060
uri/exec_opt/https://google.com (comp) 5_408 +38% +2_062 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec_opt/https://google.com (comp+exec) 29_108 -11% -3_218 97 -29% -28 97 -29% -28 12_916 -12% -1_572
uri/exec_opt/https://google.com (exec) 22_512 -23% -5_203 67 -32% -22 67 -32% -22 10_888 -21% -2_285
uri/execp/file:/random_crap (comp) 5_400 +39% +2_119 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/file:/random_crap (comp+exec) 16_846 +11% +1_871 34 -1% . 34 -1% . 7_156 +10% +683
uri/execp/file:/random_crap (exec) 10_492 -3% -333 18 +3% +1 18 +3% +1 5_128 -1% -30
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_414 +39% +2_136 4 +34% +1 4 +34% +1 2_190 +33% +713
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 46_854 -18% -8_216 217 -31% -69 217 -31% -69 19_639 -17% -3_347
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 39_594 -28% -10_955 169 -33% -56 169 -33% -56 17_611 -23% -4_060
uri/execp/https://google.com (comp) 5_417 +39% +2_104 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/https://google.com (comp+exec) 28_703 -11% -3_240 96 -28% -27 96 -28% -27 12_884 -12% -1_572
uri/execp/https://google.com (exec) 21_697 -25% -5_327 66 -31% -21 66 -31% -21 10_856 -21% -2_285
Specifically: - cut off excess precision - shorten column names, so more data fits in a given width - add absolute delta next to the existing relative delta, to reduce mental arithmetic when trying to understand - show delta as -20%/+20%, instead of -20/20. Easier to get at a glance. Also show large numbers as multipliers, as +453% is not as useful as x5.5. Concretely, it looks something like this: Before: name time_per_run_nanos delta (%) major_words_per_run delta (%) promoted_words_per_run delta (%) minor_words_per_run delta (%) split on whitespace (exec) 30_890.452 -3.524 44.885 -0.628 44.885 -0.628 7_246.000 0.000 uri/exec/file:/random_crap (exec) 10_603.425 -2.474 17.640 1.159 17.640 1.159 5_119.000 -0.000 shared prefixes (exec) 86_426.084 -1.840 38.777 0.793 38.777 0.793 13_137.000 0.000 http/manual/no group (comp+exec) 2_662_121.994 -1.808 66_647.214 -0.041 65_621.214 -0.041 580_103.000 1.706 string traversal from #210 (exec) 7_145_156.966 -1.576 1_682.150 0.000 1_682.150 0.000 37_003.000 0.000 http/manual/group (exec) 337_828.459 -1.440 985.549 0.141 985.549 0.141 49_964.000 -0.000 After: name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta . split on whitespace (exec) 30_890 -4% -1_088 45 -1% . 45 -1% . 7_246 . . uri/exec/file:/random_crap (exec) 10_603 -2% -262 18 +1% . 18 +1% . 5_119 . . shared prefixes (exec) 86_426 -2% -1_590 39 +1% . 39 +1% . 13_137 . . http/manual/no group (comp+exec) 2_662_122 -2% -48_128 66_647 . -27 65_621 . -27 580_103 +2% +9_897 string traversal from #210 (exec) 7_145_157 -2% -112_629 1_682 . . 1_682 . . 37_003 . . http/manual/group (exec) 337_828 -1% -4_864 986 . +1 986 . +1 49_964 . .
* benchmark: cleanup * benchmark: improve the display of the compare command Specifically: - cut off excess precision - shorten column names, so more data fits in a given width - add absolute delta next to the existing relative delta, to reduce mental arithmetic when trying to understand - show delta as -20%/+20%, instead of -20/20. Easier to get at a glance. Also show large numbers as multipliers, as +453% is not as useful as x5.5. Concretely, it looks something like this: Before: name time_per_run_nanos delta (%) major_words_per_run delta (%) promoted_words_per_run delta (%) minor_words_per_run delta (%) split on whitespace (exec) 30_890.452 -3.524 44.885 -0.628 44.885 -0.628 7_246.000 0.000 uri/exec/file:/random_crap (exec) 10_603.425 -2.474 17.640 1.159 17.640 1.159 5_119.000 -0.000 shared prefixes (exec) 86_426.084 -1.840 38.777 0.793 38.777 0.793 13_137.000 0.000 http/manual/no group (comp+exec) 2_662_121.994 -1.808 66_647.214 -0.041 65_621.214 -0.041 580_103.000 1.706 string traversal from #210 (exec) 7_145_156.966 -1.576 1_682.150 0.000 1_682.150 0.000 37_003.000 0.000 http/manual/group (exec) 337_828.459 -1.440 985.549 0.141 985.549 0.141 49_964.000 -0.000 After: name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta . split on whitespace (exec) 30_890 -4% -1_088 45 -1% . 45 -1% . 7_246 . . uri/exec/file:/random_crap (exec) 10_603 -2% -262 18 +1% . 18 +1% . 5_119 . . shared prefixes (exec) 86_426 -2% -1_590 39 +1% . 39 +1% . 13_137 . . http/manual/no group (comp+exec) 2_662_122 -2% -48_128 66_647 . -27 65_621 . -27 580_103 +2% +9_897 string traversal from #210 (exec) 7_145_157 -2% -112_629 1_682 . . 1_682 . . 37_003 . . http/manual/group (exec) 337_828 -1% -4_864 986 . +1 986 . +1 49_964 . . * benchmark: drop the "(compiled)" benchmarks They test literally the same thing as the non (compiled) benchmark. Instead measure the compilation cost, so we can at least eyeball the difference between compilation time and compilation+run time to understand if runtime is changing. * benchmark: bench regex execution cost excluding compilation To do this, I add an (undocumented) method to copy the mutable state of a regex, so each run has to build its own fragment of the automata. I thought briefly about adding a reset function, but it's not obviously better (requires more code to reset growable containers to their initial size). * benchmark: prefer let operators to infix operators * benchmark: when comparing benchmarks, making the sorting step optional
Benchmark compared to the previous commit: name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta . expensive color (comp+exec) 1_106_816 -62% -691_423 9_671 /5.2 -7_827 9_671 /5.2 -7_827 130_221 -36% -46_398 expensive color (comp) 1_073_147 -61% -656_264 9_671 /5.2 -7_827 9_671 /5.2 -7_827 130_221 -36% -46_398 20 zeroes/exec/00000000000000000000 (exec) 69_996 -25% -17_822 374 -3% -10 374 -3% -10 20_679 . . 20 zeroes/execp/00000000000000000000 (comp) 4_870 -10% -471 2 +2% . 2 +2% . 1_738 -2% -32 uri/exec_opt/https://google.com (comp) 7_416 -8% -568 6 -6% . 6 -6% . 2_919 -1% -37 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 3_468 -7% -258 1 +24% . 1 +24% . 982 . +2 uri/execp/https://google.com (comp) 7_396 -7% -505 6 -6% . 6 -6% . 2_919 -1% -37 kleene star compilation (comp) 3_102 -6% -201 0 +32% . 0 +32% . 833 . +3 20 zeroes/exec/00000000000000000000 (comp+exec) 59_743 -6% -3_707 392 . . 392 . . 22_255 . -32 lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 8_831 -6% -492 5 -25% -1 5 -25% -1 2_686 . +2 media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 3_725 -5% -195 1 +7% . 1 +7% . 1_062 . -3 uri/execp/file:/random_crap (comp) 7_271 -5% -374 6 -4% . 6 -4% . 2_919 -1% -37 media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 6_827 -5% -339 4 +6% . 4 +6% . 2_268 . -3 uri/exec/file:/random_crap (comp) 7_203 -5% -356 6 -4% . 6 -4% . 2_919 -1% -37 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 29_921 -5% -1_446 114 -1% -1 114 -1% -1 13_583 . . split on whitespace (comp) 3_274 -5% -152 1 +1% . 1 +1% . 889 . +3 uri/exec_opt/file:/random_crap (comp) 7_342 -5% -334 6 -6% . 6 -6% . 2_919 -1% -37 media type match/exec/ foo/bar ; charset=UTF-8 (comp) 3_630 -5% -165 1 +7% . 1 +7% . 1_062 . -3 tex gitignore/execp (exec) 2_589_010 -4% -116_489 28_313 . -30 28_313 . -30 768_192 . . tex gitignore/execp (comp+exec) 2_799_648 -4% -121_713 36_594 . -41 36_594 . -41 829_402 . -1_798 http/auto/all_gen (exec) 423_927 -4% -16_274 3_200 . . 3_200 . . 87_089 . . lots of a's/exec/aaaaaaaaaa .. (101) (comp) 3_350 -4% -127 1 +22% . 1 +22% . 982 . +2 string traversal from #210 (comp) 4_472 -4% -167 1 +38% . 1 +38% . 1_617 -1% -23 20 zeroes/execp/00000000000000000000 (comp+exec) 57_955 -4% -2_144 389 +1% +4 389 +1% +4 22_175 . -32 lots of a's/execp/aaaaaaaaaa .. (101) (comp) 3_352 -3% -110 1 +24% . 1 +24% . 982 . +2 http/manual/group (comp+exec) 345_066 -3% -11_000 1_147 -5% -53 1_147 -5% -53 53_494 . -56 kleene star compilation (exec) 72_819 -3% -2_292 1 +31% . 1 +31% . 930 . . lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_946 -3% -259 3 +55% +2 3 +55% +2 2_702 . +2 media type match/execp/ foo/bar ; charset=UTF-8 (comp) 3_595 -3% -96 1 +9% . 1 +9% . 1_062 . -3 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 38_071 -3% -1_009 149 +2% +3 149 +2% +3 16_338 . -37 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 7_203 -3% -182 6 -4% . 6 -4% . 2_919 -1% -37 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 37_252 -2% -919 150 -3% -4 150 -3% -4 16_308 . -37 http/manual/no group (comp) 10_782 -2% -264 10 -5% . 10 -5% . 3_815 -1% -56 tex gitignore/exec_opt (exec) 2_633_654 -2% -56_835 28_327 . . 28_327 . . 778_559 . . http/manual/group (exec) 323_623 -2% -6_836 987 . . 987 . . 49_964 . . http/manual/group (comp) 10_649 -2% -220 9 +4% . 9 +4% . 3_692 -2% -56 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 37_402 -2% -647 152 -3% -4 152 -3% -4 16_340 . -37 lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 5_740 -2% -98 4 . . 4 . . 1_884 . . uri/execp/file:/random_crap (comp+exec) 17_907 -2% -278 35 -2% -1 35 -2% -1 7_855 . -37 20 zeroes/exec/00000000000000000000 (comp) 4_561 -1% -68 2 +3% . 2 +3% . 1_738 -2% -32 media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 3_209 -1% -48 2 . . 2 . . 1_391 . . 20 zeroes/exec_opt/00000000000000000000 (exec) 52_434 -1% -755 369 . . 369 . . 20_681 . . uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 7_197 -1% -101 6 -4% . 6 -4% . 2_919 -1% -37 http/auto/execp no group (comp) 11_277 -1% -156 13 +8% +1 13 +8% +1 4_372 -1% -56 expensive color (exec) 141 -1% -2 0 -1% . 0 -1% . 162 . . uri/exec_opt/file:/random_crap (comp+exec) 18_028 -1% -241 33 +12% +4 33 +12% +4 7_878 . -37 http/manual/no group (exec) 2_429_939 -1% -29_165 65_989 . . 64_963 . . 566_247 . . media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 6_687 -1% -79 3 +21% +1 3 +21% +1 2_289 . -3 memory 2:20 77_998 -1% -877 1_477 -3% -47 1_477 -3% -47 33_171 . -3 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 7_188 -1% -69 6 -4% . 6 -4% . 2_919 -1% -37 tex gitignore/exec_opt (comp+exec) 2_787_674 -1% -22_370 36_251 +2% +575 36_251 +2% +575 839_769 . -1_798 uri/execp/https://google.com (comp+exec) 24_150 -1% -190 68 -3% -2 68 -3% -2 11_328 . -37 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 27_877 -1% -219 114 . . 114 . . 13_551 . . memory 2:80 1_122_771 -1% -8_581 66_424 . +27 66_166 . +27 290_597 . -3 memory 2:1000 160_069_895 -1% -971_603 9_246_981 . . 9_242_107 . . 40_299_133 . -3 memory 1:80 683_088 -1% -4_134 25_256 . +48 24_998 . +48 157_959 . -4 http/auto/all_gen (comp) 10_953 -1% -62 12 -38% -5 12 -38% -5 4_149 -1% -56 http/auto/execp no group (comp+exec) 4_352_194 -1% -22_301 141_946 . +11 140_920 . +11 1_175_271 . -56 memory 2:10 36_678 . -183 525 +2% +10 525 +2% +10 18_221 . -3 memory 1:1000 103_249_073 . -498_199 4_810_175 . +95 4_805_301 . +95 18_862_515 . -4 kleene star compilation (comp+exec) 73_182 . -336 2 +18% . 2 +18% . 1_601 . +3 lots of a's/exec/aaaaaaaaaa .. (101) (exec) 5_740 . -23 4 +1% . 4 +1% . 1_882 . . uri/execp/https://google.com (exec) 15_996 . -57 45 . . 45 . . 8_571 . . http/auto/all_gen (comp+exec) 436_052 . -1_351 3_565 . -14 3_565 . -14 91_076 . -56 repeated sequence re (comp+exec) 159_078_168 . -422_668 11_453_265 . -423 8_118_853 . -422 42_199_141 . +258 split on whitespace (exec) 29_508 . -74 45 . . 45 . . 7_246 . . memory 1:40 176_460 . -239 3_643 -1% -18 3_643 -1% -18 55_089 . -4 http/auto/execp no group (exec) 4_284_379 . -5_268 140_315 . . 139_289 . . 1_171_061 . . tex gitignore/execp (comp) 135_393 . -106 2_466 -12% -286 2_466 -12% -286 61_372 -3% -1_798 split on whitespace (comp+exec) 32_729 . +51 47 -6% -3 47 -6% -3 7_973 . +3 shared prefixes (exec) 83_386 . +178 39 . . 39 . . 13_137 . . uri/exec/https://google.com (exec) 16_369 . +53 45 . . 45 . . 8_601 . . memory 2:100 1_648_120 . +7_288 96_998 . -14 96_740 . -14 440_297 . -3 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_923 . +40 5 -2% . 5 -2% . 2_704 . +2 memory 1:20 65_448 . +298 941 +4% +35 941 +4% +35 25_723 . -4 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 28_011 . +136 113 . . 113 . . 13_581 . . shared prefixes (comp+exec) 135_504 +1% +746 495 -2% -9 495 -2% -9 40_183 -1% -278 repeated sequence re (exec) 143_068_933 +1% +895_023 11_327_143 . . 7_992_731 . . 42_041_416 . . media type match/exec/ foo/bar ; charset=UTF-8 (exec) 3_203 +1% +22 2 . . 2 . . 1_389 . . memory 1:100 1_130_975 +1% +9_976 51_907 . +43 51_649 . +43 231_529 . -4 string traversal from #210 (comp+exec) 6_861_271 +1% +73_365 1_084 +1% +15 1_084 +1% +15 38_458 . -23 uri/exec/https://google.com (comp) 7_277 +1% +80 6 -3% . 6 -3% . 2_919 -1% -37 uri/exec/https://google.com (comp+exec) 24_488 +1% +319 68 +4% +3 68 +4% +3 11_358 . -37 uri/exec_opt/https://google.com (comp+exec) 24_688 +1% +343 70 -2% -1 70 -2% -1 11_360 . -37 memory 1:10 34_068 +2% +513 365 +22% +81 365 +22% +81 16_588 . -4 string traversal from #210 (exec) 6_835_646 +2% +109_057 1_682 . . 1_682 . . 37_003 . . http/manual/no group (comp+exec) 2_424_685 +2% +38_692 66_513 . +34 65_487 . +34 569_900 . -56 shared prefixes (comp) 48_078 +2% +784 368 -6% -23 368 -6% -23 27_208 -1% -278 20 zeroes/exec_opt/00000000000000000000 (comp) 4_639 +2% +80 2 +3% . 2 +3% . 1_738 -2% -32 uri/exec/file:/random_crap (comp+exec) 17_875 +2% +310 34 . . 34 . . 7_876 . -37 memory 2:40 237_416 +2% +4_685 8_000 -1% -76 8_000 -1% -76 87_067 . -3 tex gitignore/exec_opt (comp) 132_961 +2% +2_807 2_478 -12% -298 2_478 -12% -298 61_372 -3% -1_798 media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 6_766 +2% +145 4 -3% . 4 -3% . 2_291 . -3 lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_202 +2% +114 4 -1% . 4 -1% . 1_866 . . 20 zeroes/exec_opt/00000000000000000000 (comp+exec) 55_771 +2% +1_248 406 -1% -6 406 -1% -6 22_257 . -32 uri/exec/file:/random_crap (exec) 9_892 +2% +226 18 . . 18 . . 5_119 . . uri/execp/file:/random_crap (exec) 9_711 +2% +234 18 . . 18 . . 5_098 . . uri/exec_opt/file:/random_crap (exec) 9_880 +3% +257 18 +1% . 18 +1% . 5_121 . . media type match/execp/ foo/bar ; charset=UTF-8 (exec) 3_016 +3% +92 2 +2% . 2 +2% . 1_368 . . repeated sequence re (comp) 475_729 +3% +14_657 32_157 +1% +299 32_157 +1% +299 157_887 . +258 uri/exec_opt/https://google.com (exec) 16_160 +3% +563 46 -1% . 46 -1% . 8_603 . . 20 zeroes/execp/00000000000000000000 (exec) 50_388 +9% +4_396 362 -1% -2 362 -1% -2 20_599 . . Benchmark compared to baseline in sorted by delta: name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta . uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 92_128 -61% -55_795 222 -34% -77 222 -34% -77 19_639 -17% -3_368 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 50_281 -45% -22_623 174 -35% -60 174 -35% -60 17_611 -23% -4_060 http/manual/no group (exec) 3_770_540 -36% -1_369_765 83_826 -21% -17_837 82_800 -22% -17_837 750_743 -25% -184_496 media type match/exec/ foo/bar ; charset=UTF-8 (exec) 4_828 -33% -1_603 4 -46% -2 4 -46% -2 1_942 -28% -553 media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 4_464 -29% -1_303 4 -45% -2 4 -45% -2 1_944 -28% -553 media type match/execp/ foo/bar ; charset=UTF-8 (exec) 4_371 -29% -1_263 4 -43% -2 4 -43% -2 1_921 -29% -553 http/auto/all_gen (exec) 569_892 -28% -162_239 5_893 -46% -2_693 5_893 -46% -2_693 137_350 -37% -50_261 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 39_274 -28% -11_127 174 -35% -61 174 -35% -61 17_641 -23% -4_060 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 38_209 -25% -9_734 176 -36% -63 176 -36% -63 17_643 -23% -4_060 http/auto/execp no group (comp+exec) 5_751_481 -25% -1_421_589 165_993 -14% -24_036 164_967 -15% -24_036 1_546_883 -24% -371_668 http/auto/all_gen (comp+exec) 573_808 -24% -139_107 6_561 -46% -3_010 6_561 -46% -3_010 139_848 -35% -48_828 http/manual/group (comp+exec) 439_884 -24% -105_818 2_081 -47% -988 2_081 -47% -988 80_418 -34% -26_980 http/auto/execp no group (exec) 5_612_073 -24% -1_332_962 165_882 -15% -25_568 164_856 -16% -25_568 1_544_161 -24% -373_100 http/manual/group (exec) 411_390 -23% -94_604 1_879 -47% -892 1_879 -47% -892 78_377 -36% -28_413 uri/execp/https://google.com (exec) 20_687 -23% -4_749 67 -32% -21 67 -32% -21 10_856 -21% -2_285 http/manual/no group (comp+exec) 3_180_848 -23% -717_470 84_408 -21% -17_861 83_382 -21% -17_861 752_908 -24% -183_064 kleene star compilation (exec) 90_618 -22% -20_091 1 -10% . 1 -10% . 933 . -3 uri/exec/https://google.com (exec) 20_839 -21% -4_417 68 -33% -23 68 -33% -23 10_886 -21% -2_285 uri/exec_opt/https://google.com (exec) 20_787 -20% -4_063 68 -33% -22 68 -33% -22 10_888 -21% -2_285 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 45_107 -19% -8_352 220 -33% -72 220 -33% -72 19_671 -17% -3_368 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 44_505 -17% -7_443 219 -31% -67 219 -31% -67 19_669 -17% -3_368 kleene star compilation (comp+exec) 87_221 -16% -14_375 2 +55% +1 2 +55% +1 1_247 +29% +357 20 zeroes/exec/00000000000000000000 (comp+exec) 66_112 -15% -10_077 393 . -1 393 . -1 21_520 +3% +703 memory 1:20 75_866 -13% -10_120 990 -1% -14 990 -1% -14 25_309 +2% +410 uri/execp/https://google.com (comp+exec) 27_589 -13% -3_629 96 -31% -30 96 -31% -30 12_884 -12% -1_593 string traversal from #210 (comp+exec) 7_870_136 -12% -935_500 1_450 -24% -351 1_450 -24% -351 37_806 +2% +629 media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 7_358 -12% -870 5 -11% . 5 -11% . 2_438 -7% -173 uri/exec/https://google.com (comp+exec) 28_092 -12% -3_285 96 -26% -25 96 -26% -25 12_914 -12% -1_593 string traversal from #210 (exec) 7_792_112 -11% -847_409 1_002 +68% +680 1_002 +68% +680 37_067 . -64 media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 7_349 -10% -742 6 -33% -2 6 -33% -2 2_459 -7% -173 uri/exec_opt/https://google.com (comp+exec) 27_840 -10% -2_809 98 -29% -29 98 -29% -29 12_916 -12% -1_593 tex gitignore/exec_opt (exec) 2_851_694 -10% -274_875 30_705 -8% -2_378 30_705 -8% -2_378 851_090 -9% -72_531 lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 6_217 -9% -574 3 +8% . 3 +8% . 1_889 . -5 lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_811 -9% -495 4 -4% . 4 -4% . 1_871 . -5 lots of a's/exec/aaaaaaaaaa .. (101) (exec) 6_238 -8% -521 3 +1% . 3 +1% . 1_887 . -5 tex gitignore/execp (exec) 2_683_837 -8% -211_316 30_718 -8% -2_435 30_718 -8% -2_435 840_723 -9% -72_531 memory 1:10 37_217 -7% -2_637 446 . . 446 . . 16_164 +3% +420 tex gitignore/exec_opt (comp+exec) 2_974_809 -7% -209_504 37_842 -3% -1_015 37_842 -3% -1_015 888_766 -6% -50_795 memory 2:80 1_197_252 -7% -83_063 66_887 -1% -436 66_629 -1% -436 290_280 . +314 20 zeroes/exec_opt/00000000000000000000 (exec) 55_508 -7% -3_828 368 . +1 368 . +1 20_702 . -21 tex gitignore/execp (comp+exec) 2_863_704 -6% -185_769 37_873 -3% -1_320 37_873 -3% -1_320 878_399 -6% -50_795 memory 1:80 725_285 -6% -46_331 25_202 . +101 24_944 . +101 157_605 . +350 split on whitespace (exec) 30_848 -5% -1_414 44 +1% . 44 +1% . 7_258 . -12 memory 1:40 183_733 -4% -7_512 3_612 . +13 3_612 . +13 54_695 +1% +390 memory 1:1000 107_033_634 -4% -4_282_761 4_815_591 . -5_321 4_810_717 . -5_321 18_863_081 . -570 20 zeroes/execp/00000000000000000000 (comp+exec) 58_033 -4% -2_222 397 -1% -4 397 -1% -4 21_440 +3% +703 20 zeroes/exec_opt/00000000000000000000 (comp+exec) 59_229 -4% -2_210 398 . +1 398 . +1 21_522 +3% +703 repeated sequence re (exec) 149_191_045 -4% -5_227_089 11_327_143 . . 7_992_731 . . 42_041_416 . . memory 1:100 1_176_267 -3% -35_317 53_056 -2% -1_107 52_798 -2% -1_107 231_195 . +330 20 zeroes/exec/00000000000000000000 (exec) 53_668 -3% -1_494 371 -2% -8 371 -2% -8 20_700 . -21 memory 2:20 79_328 -3% -2_208 1_550 -8% -120 1_550 -8% -120 32_734 +1% +434 memory 2:1000 163_594_532 -3% -4_496_241 9_264_357 . -17_377 9_259_483 . -17_377 40_300_656 . -1_526 repeated sequence re (comp+exec) 162_459_230 -2% -3_803_730 11_452_833 . +10 8_118_420 . +10 42_177_429 . +21_970 memory 2:100 1_684_082 -2% -28_674 97_112 . -128 96_854 . -128 440_020 . +274 memory 2:10 37_109 -2% -614 525 +2% +10 525 +2% +10 17_764 +3% +454 memory 2:40 244_915 -1% -2_814 7_885 +1% +39 7_885 +1% +39 86_670 . +394 shared prefixes (exec) 84_515 -1% -951 40 -2% -1 40 -2% -1 13_155 . -18 20 zeroes/execp/00000000000000000000 (exec) 55_278 -1% -494 365 -1% -5 365 -1% -5 20_620 . -21 uri/exec_opt/file:/random_crap (exec) 10_221 -1% -85 19 -5% -1 19 -5% -1 5_151 -1% -30 uri/exec/file:/random_crap (exec) 10_166 . -48 19 -7% -1 19 -7% -1 5_149 -1% -30 expensive color (exec) 140 . . 0 -1% . 0 -1% . 162 . . media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 6_910 . . 5 -22% -1 5 -22% -1 2_461 -7% -173 split on whitespace (comp+exec) 32_777 . +3 46 -4% -2 46 -4% -2 7_627 +5% +349 uri/execp/file:/random_crap (exec) 9_919 . +26 19 -1% . 19 -1% . 5_128 -1% -30 lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_366 +4% +321 5 +3% . 5 +3% . 2_287 +18% +417 lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 7_956 +5% +382 5 -10% . 5 -10% . 2_271 +18% +417 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_398 +7% +565 5 +11% +1 5 +11% +1 2_289 +18% +417 uri/exec/file:/random_crap (comp+exec) 16_183 +12% +2_002 35 -1% . 35 -1% . 7_177 +9% +662 uri/exec_opt/file:/random_crap (comp+exec) 15_686 +13% +2_102 34 +10% +3 34 +10% +3 7_179 +9% +662 uri/execp/file:/random_crap (comp+exec) 15_538 +13% +2_091 35 -2% -1 35 -2% -1 7_156 +9% +662 shared prefixes (comp+exec) 117_210 +16% +19_040 336 +44% +149 336 +44% +149 31_140 +28% +8_765 repeated sequence re (comp) 415_574 +18% +74_812 32_982 -2% -526 32_982 -2% -526 136_175 +16% +21_970 uri/execp/file:/random_crap (comp) 5_135 +34% +1_762 4 +26% +1 4 +26% +1 2_190 +32% +692 uri/exec_opt/https://google.com (comp) 5_064 +35% +1_784 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec/file:/random_crap (comp) 5_052 +36% +1_795 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/execp/https://google.com (comp) 5_075 +36% +1_816 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_183 +37% +1_937 4 +25% +1 4 +25% +1 2_190 +32% +692 media type match/exec/ foo/bar ; charset=UTF-8 (comp) 2_517 +38% +949 1 +84% . 1 +84% . 679 +56% +380 media type match/execp/ foo/bar ; charset=UTF-8 (comp) 2_529 +38% +970 1 +85% . 1 +85% . 679 +56% +380 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_066 +39% +1_955 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec_opt/file:/random_crap (comp) 5_042 +39% +1_966 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_036 +41% +2_060 4 +25% +1 4 +25% +1 2_190 +32% +692 lots of a's/exec/aaaaaaaaaa .. (101) (comp) 2_274 +42% +949 0 x3.5 +1 0 x3.5 +1 562 +75% +422 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 2_238 +43% +971 0 x3.5 +1 0 x3.5 +1 562 +75% +422 split on whitespace (comp) 2_178 +43% +945 0 x2.3 . 0 x2.3 . 531 +68% +361 lots of a's/execp/aaaaaaaaaa .. (101) (comp) 2_234 +45% +1_007 0 x3.5 +1 0 x3.5 +1 562 +75% +422 20 zeroes/exec/00000000000000000000 (comp) 3_096 +45% +1_397 1 x2.3 +1 1 x2.3 +1 982 +74% +724 uri/exec/https://google.com (comp) 5_040 +46% +2_317 4 +28% +1 4 +28% +1 2_190 +32% +692 kleene star compilation (comp) 1_961 +48% +940 0 x2.6 . 0 x2.6 . 476 +76% +360 20 zeroes/execp/00000000000000000000 (comp) 2_971 +48% +1_427 1 x2.3 +1 1 x2.3 +1 982 +74% +724 media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 2_368 +49% +1_162 1 +82% . 1 +82% . 679 +56% +380 20 zeroes/exec_opt/00000000000000000000 (comp) 3_077 +53% +1_643 1 x2.3 +1 1 x2.3 +1 982 +74% +724 string traversal from #210 (comp) 2_775 +55% +1_531 1 x2.4 +1 1 x2.4 +1 901 +77% +693 http/manual/group (comp) 6_581 +58% +3_849 5 x2.0 +5 5 x2.0 +5 2_203 +65% +1_433 shared prefixes (comp) 29_938 +63% +18_924 208 +65% +136 208 +65% +136 18_147 +48% +8_783 tex gitignore/execp (comp) 79_824 +69% +55_463 1_238 +76% +942 1_238 +76% +942 37_838 +57% +21_736 tex gitignore/exec_opt (comp) 79_775 +70% +55_992 1_238 +76% +942 1_238 +76% +942 37_838 +57% +21_736 http/auto/execp no group (comp) 6_413 +73% +4_707 8 +68% +6 8 +68% +6 2_884 +50% +1_432 http/auto/all_gen (comp) 6_217 +75% +4_675 7 +15% +1 7 +15% +1 2_660 +54% +1_433 http/manual/no group (comp) 5_880 +79% +4_639 5 +71% +4 5 +71% +4 2_327 +62% +1_432 expensive color (comp+exec) 53_400 x7.8 +361_993 374 x4.9 +1_470 374 x4.9 +1_470 23_969 x3.5 +59_854 expensive color (comp) 52_153 x8.0 +364_729 372 x5.0 +1_472 372 x5.0 +1_472 23_969 x3.5 +59_854 Benchmark compared to baseline sorted by name: name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta . 20 zeroes/exec/00000000000000000000 (comp) 3_096 +45% +1_397 1 x2.3 +1 1 x2.3 +1 982 +74% +724 20 zeroes/exec/00000000000000000000 (comp+exec) 66_112 -15% -10_077 393 . -1 393 . -1 21_520 +3% +703 20 zeroes/exec/00000000000000000000 (exec) 53_668 -3% -1_494 371 -2% -8 371 -2% -8 20_700 . -21 20 zeroes/exec_opt/00000000000000000000 (comp) 3_077 +53% +1_643 1 x2.3 +1 1 x2.3 +1 982 +74% +724 20 zeroes/exec_opt/00000000000000000000 (comp+exec) 59_229 -4% -2_210 398 . +1 398 . +1 21_522 +3% +703 20 zeroes/exec_opt/00000000000000000000 (exec) 55_508 -7% -3_828 368 . +1 368 . +1 20_702 . -21 20 zeroes/execp/00000000000000000000 (comp) 2_971 +48% +1_427 1 x2.3 +1 1 x2.3 +1 982 +74% +724 20 zeroes/execp/00000000000000000000 (comp+exec) 58_033 -4% -2_222 397 -1% -4 397 -1% -4 21_440 +3% +703 20 zeroes/execp/00000000000000000000 (exec) 55_278 -1% -494 365 -1% -5 365 -1% -5 20_620 . -21 expensive color (comp) 52_153 x8.0 +364_729 372 x5.0 +1_472 372 x5.0 +1_472 23_969 x3.5 +59_854 expensive color (comp+exec) 53_400 x7.8 +361_993 374 x4.9 +1_470 374 x4.9 +1_470 23_969 x3.5 +59_854 expensive color (exec) 140 . . 0 -1% . 0 -1% . 162 . . http/auto/all_gen (comp) 6_217 +75% +4_675 7 +15% +1 7 +15% +1 2_660 +54% +1_433 http/auto/all_gen (comp+exec) 573_808 -24% -139_107 6_561 -46% -3_010 6_561 -46% -3_010 139_848 -35% -48_828 http/auto/all_gen (exec) 569_892 -28% -162_239 5_893 -46% -2_693 5_893 -46% -2_693 137_350 -37% -50_261 http/auto/execp no group (comp) 6_413 +73% +4_707 8 +68% +6 8 +68% +6 2_884 +50% +1_432 http/auto/execp no group (comp+exec) 5_751_481 -25% -1_421_589 165_993 -14% -24_036 164_967 -15% -24_036 1_546_883 -24% -371_668 http/auto/execp no group (exec) 5_612_073 -24% -1_332_962 165_882 -15% -25_568 164_856 -16% -25_568 1_544_161 -24% -373_100 http/manual/group (comp) 6_581 +58% +3_849 5 x2.0 +5 5 x2.0 +5 2_203 +65% +1_433 http/manual/group (comp+exec) 439_884 -24% -105_818 2_081 -47% -988 2_081 -47% -988 80_418 -34% -26_980 http/manual/group (exec) 411_390 -23% -94_604 1_879 -47% -892 1_879 -47% -892 78_377 -36% -28_413 http/manual/no group (comp) 5_880 +79% +4_639 5 +71% +4 5 +71% +4 2_327 +62% +1_432 http/manual/no group (comp+exec) 3_180_848 -23% -717_470 84_408 -21% -17_861 83_382 -21% -17_861 752_908 -24% -183_064 http/manual/no group (exec) 3_770_540 -36% -1_369_765 83_826 -21% -17_837 82_800 -22% -17_837 750_743 -25% -184_496 kleene star compilation (comp) 1_961 +48% +940 0 x2.6 . 0 x2.6 . 476 +76% +360 kleene star compilation (comp+exec) 87_221 -16% -14_375 2 +55% +1 2 +55% +1 1_247 +29% +357 kleene star compilation (exec) 90_618 -22% -20_091 1 -10% . 1 -10% . 933 . -3 lots of a's/exec/aaaaaaaaaa .. (101) (comp) 2_274 +42% +949 0 x3.5 +1 0 x3.5 +1 562 +75% +422 lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_366 +4% +321 5 +3% . 5 +3% . 2_287 +18% +417 lots of a's/exec/aaaaaaaaaa .. (101) (exec) 6_238 -8% -521 3 +1% . 3 +1% . 1_887 . -5 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 2_238 +43% +971 0 x3.5 +1 0 x3.5 +1 562 +75% +422 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_398 +7% +565 5 +11% +1 5 +11% +1 2_289 +18% +417 lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 6_217 -9% -574 3 +8% . 3 +8% . 1_889 . -5 lots of a's/execp/aaaaaaaaaa .. (101) (comp) 2_234 +45% +1_007 0 x3.5 +1 0 x3.5 +1 562 +75% +422 lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 7_956 +5% +382 5 -10% . 5 -10% . 2_271 +18% +417 lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_811 -9% -495 4 -4% . 4 -4% . 1_871 . -5 media type match/exec/ foo/bar ; charset=UTF-8 (comp) 2_517 +38% +949 1 +84% . 1 +84% . 679 +56% +380 media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 7_349 -10% -742 6 -33% -2 6 -33% -2 2_459 -7% -173 media type match/exec/ foo/bar ; charset=UTF-8 (exec) 4_828 -33% -1_603 4 -46% -2 4 -46% -2 1_942 -28% -553 media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 2_368 +49% +1_162 1 +82% . 1 +82% . 679 +56% +380 media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 6_910 . . 5 -22% -1 5 -22% -1 2_461 -7% -173 media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 4_464 -29% -1_303 4 -45% -2 4 -45% -2 1_944 -28% -553 media type match/execp/ foo/bar ; charset=UTF-8 (comp) 2_529 +38% +970 1 +85% . 1 +85% . 679 +56% +380 media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 7_358 -12% -870 5 -11% . 5 -11% . 2_438 -7% -173 media type match/execp/ foo/bar ; charset=UTF-8 (exec) 4_371 -29% -1_263 4 -43% -2 4 -43% -2 1_921 -29% -553 memory 1:10 37_217 -7% -2_637 446 . . 446 . . 16_164 +3% +420 memory 1:100 1_176_267 -3% -35_317 53_056 -2% -1_107 52_798 -2% -1_107 231_195 . +330 memory 1:1000 107_033_634 -4% -4_282_761 4_815_591 . -5_321 4_810_717 . -5_321 18_863_081 . -570 memory 1:20 75_866 -13% -10_120 990 -1% -14 990 -1% -14 25_309 +2% +410 memory 1:40 183_733 -4% -7_512 3_612 . +13 3_612 . +13 54_695 +1% +390 memory 1:80 725_285 -6% -46_331 25_202 . +101 24_944 . +101 157_605 . +350 memory 2:10 37_109 -2% -614 525 +2% +10 525 +2% +10 17_764 +3% +454 memory 2:100 1_684_082 -2% -28_674 97_112 . -128 96_854 . -128 440_020 . +274 memory 2:1000 163_594_532 -3% -4_496_241 9_264_357 . -17_377 9_259_483 . -17_377 40_300_656 . -1_526 memory 2:20 79_328 -3% -2_208 1_550 -8% -120 1_550 -8% -120 32_734 +1% +434 memory 2:40 244_915 -1% -2_814 7_885 +1% +39 7_885 +1% +39 86_670 . +394 memory 2:80 1_197_252 -7% -83_063 66_887 -1% -436 66_629 -1% -436 290_280 . +314 repeated sequence re (comp) 415_574 +18% +74_812 32_982 -2% -526 32_982 -2% -526 136_175 +16% +21_970 repeated sequence re (comp+exec) 162_459_230 -2% -3_803_730 11_452_833 . +10 8_118_420 . +10 42_177_429 . +21_970 repeated sequence re (exec) 149_191_045 -4% -5_227_089 11_327_143 . . 7_992_731 . . 42_041_416 . . shared prefixes (comp) 29_938 +63% +18_924 208 +65% +136 208 +65% +136 18_147 +48% +8_783 shared prefixes (comp+exec) 117_210 +16% +19_040 336 +44% +149 336 +44% +149 31_140 +28% +8_765 shared prefixes (exec) 84_515 -1% -951 40 -2% -1 40 -2% -1 13_155 . -18 split on whitespace (comp) 2_178 +43% +945 0 x2.3 . 0 x2.3 . 531 +68% +361 split on whitespace (comp+exec) 32_777 . +3 46 -4% -2 46 -4% -2 7_627 +5% +349 split on whitespace (exec) 30_848 -5% -1_414 44 +1% . 44 +1% . 7_258 . -12 string traversal from #210 (comp) 2_775 +55% +1_531 1 x2.4 +1 1 x2.4 +1 901 +77% +693 string traversal from #210 (comp+exec) 7_870_136 -12% -935_500 1_450 -24% -351 1_450 -24% -351 37_806 +2% +629 string traversal from #210 (exec) 7_792_112 -11% -847_409 1_002 +68% +680 1_002 +68% +680 37_067 . -64 tex gitignore/exec_opt (comp) 79_775 +70% +55_992 1_238 +76% +942 1_238 +76% +942 37_838 +57% +21_736 tex gitignore/exec_opt (comp+exec) 2_974_809 -7% -209_504 37_842 -3% -1_015 37_842 -3% -1_015 888_766 -6% -50_795 tex gitignore/exec_opt (exec) 2_851_694 -10% -274_875 30_705 -8% -2_378 30_705 -8% -2_378 851_090 -9% -72_531 tex gitignore/execp (comp) 79_824 +69% +55_463 1_238 +76% +942 1_238 +76% +942 37_838 +57% +21_736 tex gitignore/execp (comp+exec) 2_863_704 -6% -185_769 37_873 -3% -1_320 37_873 -3% -1_320 878_399 -6% -50_795 tex gitignore/execp (exec) 2_683_837 -8% -211_316 30_718 -8% -2_435 30_718 -8% -2_435 840_723 -9% -72_531 uri/exec/file:/random_crap (comp) 5_052 +36% +1_795 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec/file:/random_crap (comp+exec) 16_183 +12% +2_002 35 -1% . 35 -1% . 7_177 +9% +662 uri/exec/file:/random_crap (exec) 10_166 . -48 19 -7% -1 19 -7% -1 5_149 -1% -30 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_066 +39% +1_955 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 44_505 -17% -7_443 219 -31% -67 219 -31% -67 19_669 -17% -3_368 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 39_274 -28% -11_127 174 -35% -61 174 -35% -61 17_641 -23% -4_060 uri/exec/https://google.com (comp) 5_040 +46% +2_317 4 +28% +1 4 +28% +1 2_190 +32% +692 uri/exec/https://google.com (comp+exec) 28_092 -12% -3_285 96 -26% -25 96 -26% -25 12_914 -12% -1_593 uri/exec/https://google.com (exec) 20_839 -21% -4_417 68 -33% -23 68 -33% -23 10_886 -21% -2_285 uri/exec_opt/file:/random_crap (comp) 5_042 +39% +1_966 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec_opt/file:/random_crap (comp+exec) 15_686 +13% +2_102 34 +10% +3 34 +10% +3 7_179 +9% +662 uri/exec_opt/file:/random_crap (exec) 10_221 -1% -85 19 -5% -1 19 -5% -1 5_151 -1% -30 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_036 +41% +2_060 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 45_107 -19% -8_352 220 -33% -72 220 -33% -72 19_671 -17% -3_368 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 38_209 -25% -9_734 176 -36% -63 176 -36% -63 17_643 -23% -4_060 uri/exec_opt/https://google.com (comp) 5_064 +35% +1_784 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec_opt/https://google.com (comp+exec) 27_840 -10% -2_809 98 -29% -29 98 -29% -29 12_916 -12% -1_593 uri/exec_opt/https://google.com (exec) 20_787 -20% -4_063 68 -33% -22 68 -33% -22 10_888 -21% -2_285 uri/execp/file:/random_crap (comp) 5_135 +34% +1_762 4 +26% +1 4 +26% +1 2_190 +32% +692 uri/execp/file:/random_crap (comp+exec) 15_538 +13% +2_091 35 -2% -1 35 -2% -1 7_156 +9% +662 uri/execp/file:/random_crap (exec) 9_919 . +26 19 -1% . 19 -1% . 5_128 -1% -30 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_183 +37% +1_937 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 92_128 -61% -55_795 222 -34% -77 222 -34% -77 19_639 -17% -3_368 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 50_281 -45% -22_623 174 -35% -60 174 -35% -60 17_611 -23% -4_060 uri/execp/https://google.com (comp) 5_075 +36% +1_816 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/execp/https://google.com (comp+exec) 27_589 -13% -3_629 96 -31% -30 96 -31% -30 12_884 -12% -1_593 uri/execp/https://google.com (exec) 20_687 -23% -4_749 67 -32% -21 67 -32% -21 10_856 -21% -2_285
Specifically, shrink color maps by lifting the constraint that colors represent
_contiguous_ character sets. So now, re compiles [A-Za-z] to 2 colors (one for
[A-Za-z], one for everything else), instead of 5 (the gap before A-Z, A-Z, the gap
until a-z, a-z, the gap after a-z).
The change to the number of colors can be large, as you can see in the tests with 20
colors becoming two (although IIUC the specific charset used matches on latin1, so it
seems like an api that should be deprecated in favor of charsets matching only ascii
letters, in which case the improvement would be smaller)
This is not driven by any need. I had simply implemented non-contiguous colors in a
project recently, and was surprised to see this limitation in re.
Benchmarks show compilation is somewhat slower and execution is neutral or somewhat
faster. Based on that, I'd say the change is worthwhile, but what gives me pause is:
it's possible to build regexes with much worse degradation in compilation time than the
benchmarks show (still linear in regex size, but with worse constant factors by
increasing number of boundaries * number of charsets overlapping these boundaries). I
don't know of a realistic regex that would do this, but a contrived example would be:
let expensive_color =
let re () =
List.init 127 ~f:(fun i ->
Re.diff
(Re.rg (Char.of_int_exn 0) (Char.of_int_exn 127))
(Re.char (Char.of_int_exn i)))
|> Re.seq
|> Re.compile
in
test ~name:"expensive color" re (fun re -> re ())
;;
Which takes 50us to compile before, and 1ms after, so 20x more.
Everything below is about benchmarks.
My interpretation of the benchmarks is that:
- regexes that compile quickly take significantly longer to compile in relative terms
(like +50%), but we're talking about an increase from, say, 3us to 4.5us, so I think
that's a non issue. I don't think this could be reduced either: the computation is
fundamentally harder. In such cases, the execution time ranges from neutral to -30%,
but for the most part, the absolute improvement is tiny, thus irrelevant.
- The one case where a regex that compiles quickly is run on a bigger text (the
http/ benchmark) shows something like -25% execution, thus offseting the compilation
time increase 200x over (to be clear, "execution" is first execution, not just
running through pre-existing states. No idea if that would show much improvement).
- The first slower to compile regex is the tex one, and this is one of the best cases:
+70%/+50us of compilation time, -20%/-200us of execution.
- The other slower to compile regex is "shared prefixes", whose compilation time
increases by 21us/73% for no gain of execution (because the colors are already close to
optimal, so the extra work is for naught).
An other potential benefit would be less memory consumption for transition tables in
the automata. No idea if that's significant.
Benchmarks before/after, sorted by relative difference:
name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta .
media type match/execp/ foo/bar ; charset=UTF-8 (exec) 4_513 -29% -1_319 4 -41% -2 4 -41% -2 1_921 -29% -553
media type match/exec/ foo/bar ; charset=UTF-8 (exec) 4_699 -28% -1_311 4 -46% -2 4 -46% -2 1_942 -28% -553
media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 4_672 -28% -1_294 4 -39% -1 4 -39% -1 1_944 -28% -553
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 39_594 -28% -10_955 169 -33% -56 169 -33% -56 17_611 -23% -4_060
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_285 -26% -10_398 173 -35% -60 173 -35% -60 17_641 -23% -4_060
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_125 -25% -10_153 146 -22% -32 146 -22% -32 17_643 -23% -4_060
http/manual/no group (exec) 3_351_134 -25% -831_503 83_433 -21% -17_443 82_407 -21% -17_443 750_743 -25% -184_496
uri/execp/https://google.com (exec) 21_697 -25% -5_327 66 -31% -21 66 -31% -21 10_856 -21% -2_285
http/auto/all_gen (exec) 601_617 -24% -144_548 5_907 -46% -2_694 5_907 -46% -2_694 137_350 -37% -50_261
http/manual/no group (comp+exec) 3_383_407 -24% -812_448 84_119 -21% -17_605 83_093 -21% -17_605 752_908 -24% -183_042
http/auto/execp no group (exec) 5_871_220 -24% -1_380_560 164_038 -14% -22_320 163_012 -14% -22_320 1_544_161 -24% -373_100
uri/exec/https://google.com (exec) 22_490 -23% -5_226 66 -31% -21 66 -31% -21 10_886 -21% -2_285
http/auto/execp no group (comp+exec) 5_899_317 -23% -1_364_590 165_530 -14% -23_877 164_504 -15% -23_877 1_546_883 -24% -371_646
uri/exec_opt/https://google.com (exec) 22_512 -23% -5_203 67 -32% -22 67 -32% -22 10_888 -21% -2_285
http/auto/all_gen (comp+exec) 622_097 -23% -141_110 6_467 -44% -2_858 6_467 -44% -2_858 139_848 -35% -48_806
http/manual/group (exec) 443_437 -19% -82_210 1_848 -48% -895 1_848 -48% -895 78_377 -36% -28_413
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_453 -18% -8_772 219 -33% -73 219 -33% -73 19_669 -17% -3_347
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_377 -18% -8_492 219 -33% -73 219 -33% -73 19_671 -17% -3_347
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 46_854 -18% -8_216 217 -31% -69 217 -31% -69 19_639 -17% -3_347
http/manual/group (comp+exec) 456_009 -17% -76_826 2_043 -47% -951 2_043 -47% -951 80_418 -34% -26_958
repeated sequence re (comp+exec) 195_417_983 -17% -32_910_545 11_460_627 . -8_904 8_126_215 . -8_904 42_177_429 . +21_453
repeated sequence re (exec) 171_150_613 -13% -21_558_595 11_320_086 . +7_058 7_985_674 . +7_058 42_041_416 . .
uri/exec/https://google.com (comp+exec) 29_170 -12% -3_360 97 -28% -27 97 -28% -27 12_914 -12% -1_572
uri/execp/https://google.com (comp+exec) 28_703 -11% -3_240 96 -28% -27 96 -28% -27 12_884 -12% -1_572
20 zeroes/exec/00000000000000000000 (exec) 59_782 -11% -6_630 371 -2% -7 371 -2% -7 20_700 . -21
uri/exec_opt/https://google.com (comp+exec) 29_108 -11% -3_218 97 -29% -28 97 -29% -28 12_916 -12% -1_572
tex gitignore/exec_opt (exec) 3_066_236 -11% -322_463 30_486 -7% -2_159 30_486 -7% -2_159 851_090 -9% -72_531
string traversal from ocaml#210 (comp+exec) 8_274_467 -10% -810_233 1_206 +5% +57 1_206 +5% +57 37_806 +2% +632
tex gitignore/execp (exec) 2_855_950 -9% -268_012 30_416 -7% -2_103 30_416 -7% -2_103 840_723 -9% -72_531
tex gitignore/execp (comp+exec) 3_022_509 -7% -224_179 37_570 -2% -609 37_570 -2% -609 878_399 -6% -49_871
tex gitignore/exec_opt (comp+exec) 3_188_400 -7% -226_883 37_625 -7% -2_471 37_625 -7% -2_471 888_766 -6% -49_871
memory 2:1000 175_572_565 -6% -9_964_875 9_201_714 . +45_760 9_196_840 . +45_760 40_300_656 . -1_531
20 zeroes/exec_opt/00000000000000000000 (exec) 55_978 -5% -2_716 370 . +2 370 . +2 20_702 . -21
20 zeroes/execp/00000000000000000000 (exec) 55_462 -5% -2_641 365 -1% -4 365 -1% -4 20_620 . -21
lots of a's/exec/aaaaaaaaaa .. (101) (exec) 6_190 -4% -256 3 +2% . 3 +2% . 1_887 . -5
media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 7_285 -4% -258 5 -25% -1 5 -25% -1 2_459 -7% -175
media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 7_118 -3% -228 4 -6% . 4 -6% . 2_438 -7% -175
uri/execp/file:/random_crap (exec) 10_492 -3% -333 18 +3% +1 18 +3% +1 5_128 -1% -30
20 zeroes/exec/00000000000000000000 (comp+exec) 59_969 -3% -1_837 394 +1% +4 394 +1% +4 21_520 +3% +712
lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 6_161 -3% -178 3 +11% . 3 +11% . 1_889 . -5
lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_756 -3% -161 3 +8% . 3 +8% . 1_871 . -5
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 7_256 -3% -195 4 -4% . 4 -4% . 2_461 -7% -175
string traversal from ocaml#210 (exec) 7_635_452 -2% -188_517 1_253 -19% -240 1_253 -19% -240 37_067 . -64
20 zeroes/execp/00000000000000000000 (comp+exec) 59_155 -2% -1_345 387 -13% -49 387 -13% -49 21_440 +3% +712
uri/exec_opt/file:/random_crap (exec) 10_711 -2% -194 17 +7% +1 17 +7% +1 5_151 -1% -30
20 zeroes/exec_opt/00000000000000000000 (comp+exec) 59_517 -2% -1_051 395 -3% -13 395 -3% -13 21_522 +3% +712
uri/exec/file:/random_crap (exec) 10_689 -1% -141 19 -5% -1 19 -5% -1 5_149 -1% -30
kleene star compilation (comp+exec) 81_531 -1% -676 2 +92% +2 2 +92% +2 1_247 +28% +350
memory 2:80 1_151_523 +2% +18_398 66_458 . +102 66_200 . +102 290_280 . +309
memory 2:100 1_721_811 +2% +30_899 96_826 . -123 96_568 . -123 440_020 . +269
kleene star compilation (exec) 75_526 +2% +1_359 1 -24% . 1 -24% . 933 . -3
memory 1:1000 102_761_165 +5% +5_115_898 4_816_835 . -6_566 4_811_961 . -6_566 18_863_081 . -573
memory 1:100 1_118_623 +7% +72_896 52_418 +3% +1_329 52_160 +3% +1_329 231_195 . +327
memory 1:80 673_735 +7% +44_323 24_862 +2% +473 24_604 +2% +473 157_605 . +347
memory 1:40 174_551 +8% +13_144 3_596 +2% +75 3_596 +2% +75 54_695 +1% +387
memory 2:40 233_807 +8% +19_557 7_664 +11% +809 7_664 +11% +809 86_670 . +389
split on whitespace (exec) 29_946 +9% +2_561 43 +2% +1 43 +2% +1 7_258 . -12
shared prefixes (exec) 81_629 +9% +7_117 39 . . 39 . . 13_155 . -18
memory 1:20 63_875 +9% +5_612 970 -1% -6 970 -1% -6 25_309 +2% +407
memory 2:20 74_262 +9% +6_855 1_480 -3% -46 1_480 -3% -46 32_734 +1% +429
repeated sequence re (comp) 446_678 +10% +45_188 34_998 -7% -2_421 34_998 -7% -2_421 136_175 +16% +21_453
memory 1:10 32_672 +11% +3_472 441 +1% +5 441 +1% +5 16_164 +3% +417
memory 2:10 35_086 +11% +3_795 524 +1% +5 524 +1% +5 17_764 +3% +449
uri/exec_opt/file:/random_crap (comp+exec) 17_104 +11% +1_856 35 +4% +1 35 +4% +1 7_179 +10% +683
uri/execp/file:/random_crap (comp+exec) 16_846 +11% +1_871 34 -1% . 34 -1% . 7_156 +10% +683
lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_357 +11% +958 5 +7% . 5 +7% . 2_287 +18% +409
uri/exec/file:/random_crap (comp+exec) 17_032 +12% +2_011 34 -2% -1 34 -2% -1 7_177 +10% +683
split on whitespace (comp+exec) 31_769 +14% +4_402 47 -2% -1 47 -2% -1 7_627 +4% +341
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_296 +14% +1_162 3 +57% +2 3 +57% +2 2_289 +18% +409
lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 7_915 +18% +1_423 5 +12% +1 5 +12% +1 2_271 +18% +409
shared prefixes (comp+exec) 117_673 +23% +26_637 332 +48% +160 332 +48% +160 31_140 +28% +8_666
uri/exec/https://google.com (comp) 5_426 +38% +2_038 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec/file:/random_crap (comp) 5_427 +38% +2_041 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec_opt/https://google.com (comp) 5_408 +38% +2_062 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec_opt/file:/random_crap (comp) 5_411 +39% +2_088 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_412 +39% +2_093 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/https://google.com (comp) 5_417 +39% +2_104 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_410 +39% +2_108 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/file:/random_crap (comp) 5_400 +39% +2_119 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_414 +39% +2_136 4 +34% +1 4 +34% +1 2_190 +33% +713
20 zeroes/exec/00000000000000000000 (comp) 3_077 +44% +1_361 1 x2.4 +1 1 x2.4 +1 982 +75% +733
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_182 0 +96% . 0 +96% . 679 +56% +378
media type match/execp/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_189 0 +96% . 0 +96% . 679 +56% +378
20 zeroes/exec_opt/00000000000000000000 (comp) 3_109 +49% +1_519 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/execp/00000000000000000000 (comp) 3_103 +49% +1_517 1 x2.4 +1 1 x2.4 +1 982 +75% +733
media type match/exec/ foo/bar ; charset=UTF-8 (comp) 2_526 +50% +1_268 0 x2.1 +1 0 x2.1 +1 679 +56% +378
lots of a's/exec/aaaaaaaaaa .. (101) (comp) 2_232 +50% +1_127 0 x2.6 . 0 x2.6 . 562 +74% +414
kleene star compilation (comp) 2_064 +51% +1_047 0 +65% . 0 +65% . 476 +74% +353
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 2_229 +52% +1_164 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/execp/aaaaaaaaaa .. (101) (comp) 2_235 +53% +1_187 0 x2.6 . 0 x2.6 . 562 +74% +414
split on whitespace (comp) 2_123 +57% +1_200 0 x3.1 . 0 x3.1 . 531 +66% +353
string traversal from ocaml#210 (comp) 2_954 +57% +1_682 1 +90% +1 1 +90% +1 901 +77% +696
tex gitignore/exec_opt (comp) 87_067 +63% +54_634 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
tex gitignore/execp (comp) 87_089 +63% +54_728 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
http/auto/execp no group (comp) 6_989 +68% +4_782 8 +55% +5 8 +55% +5 2_884 +50% +1_454
http/manual/no group (comp) 6_519 +70% +4_552 5 +89% +5 5 +89% +5 2_327 +62% +1_454
http/auto/all_gen (comp) 6_683 +71% +4_739 7 +74% +5 7 +74% +5 2_660 +55% +1_455
shared prefixes (comp) 29_595 +73% +21_667 201 +74% +148 201 +74% +148 18_147 +48% +8_684
http/manual/group (comp) 6_184 +76% +4_696 5 +99% +5 5 +99% +5 2_203 +66% +1_455
Same thing, but sorted by name:
name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta .
20 zeroes/exec/00000000000000000000 (comp) 3_077 +44% +1_361 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/exec/00000000000000000000 (comp+exec) 59_969 -3% -1_837 394 +1% +4 394 +1% +4 21_520 +3% +712
20 zeroes/exec/00000000000000000000 (exec) 59_782 -11% -6_630 371 -2% -7 371 -2% -7 20_700 . -21
20 zeroes/exec_opt/00000000000000000000 (comp) 3_109 +49% +1_519 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/exec_opt/00000000000000000000 (comp+exec) 59_517 -2% -1_051 395 -3% -13 395 -3% -13 21_522 +3% +712
20 zeroes/exec_opt/00000000000000000000 (exec) 55_978 -5% -2_716 370 . +2 370 . +2 20_702 . -21
20 zeroes/execp/00000000000000000000 (comp) 3_103 +49% +1_517 1 x2.4 +1 1 x2.4 +1 982 +75% +733
20 zeroes/execp/00000000000000000000 (comp+exec) 59_155 -2% -1_345 387 -13% -49 387 -13% -49 21_440 +3% +712
20 zeroes/execp/00000000000000000000 (exec) 55_462 -5% -2_641 365 -1% -4 365 -1% -4 20_620 . -21
http/auto/all_gen (comp) 6_683 +71% +4_739 7 +74% +5 7 +74% +5 2_660 +55% +1_455
http/auto/all_gen (comp+exec) 622_097 -23% -141_110 6_467 -44% -2_858 6_467 -44% -2_858 139_848 -35% -48_806
http/auto/all_gen (exec) 601_617 -24% -144_548 5_907 -46% -2_694 5_907 -46% -2_694 137_350 -37% -50_261
http/auto/execp no group (comp) 6_989 +68% +4_782 8 +55% +5 8 +55% +5 2_884 +50% +1_454
http/auto/execp no group (comp+exec) 5_899_317 -23% -1_364_590 165_530 -14% -23_877 164_504 -15% -23_877 1_546_883 -24% -371_646
http/auto/execp no group (exec) 5_871_220 -24% -1_380_560 164_038 -14% -22_320 163_012 -14% -22_320 1_544_161 -24% -373_100
http/manual/group (comp) 6_184 +76% +4_696 5 +99% +5 5 +99% +5 2_203 +66% +1_455
http/manual/group (comp+exec) 456_009 -17% -76_826 2_043 -47% -951 2_043 -47% -951 80_418 -34% -26_958
http/manual/group (exec) 443_437 -19% -82_210 1_848 -48% -895 1_848 -48% -895 78_377 -36% -28_413
http/manual/no group (comp) 6_519 +70% +4_552 5 +89% +5 5 +89% +5 2_327 +62% +1_454
http/manual/no group (comp+exec) 3_383_407 -24% -812_448 84_119 -21% -17_605 83_093 -21% -17_605 752_908 -24% -183_042
http/manual/no group (exec) 3_351_134 -25% -831_503 83_433 -21% -17_443 82_407 -21% -17_443 750_743 -25% -184_496
kleene star compilation (comp) 2_064 +51% +1_047 0 +65% . 0 +65% . 476 +74% +353
kleene star compilation (comp+exec) 81_531 -1% -676 2 +92% +2 2 +92% +2 1_247 +28% +350
kleene star compilation (exec) 75_526 +2% +1_359 1 -24% . 1 -24% . 933 . -3
lots of a's/exec/aaaaaaaaaa .. (101) (comp) 2_232 +50% +1_127 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_357 +11% +958 5 +7% . 5 +7% . 2_287 +18% +409
lots of a's/exec/aaaaaaaaaa .. (101) (exec) 6_190 -4% -256 3 +2% . 3 +2% . 1_887 . -5
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 2_229 +52% +1_164 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_296 +14% +1_162 3 +57% +2 3 +57% +2 2_289 +18% +409
lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 6_161 -3% -178 3 +11% . 3 +11% . 1_889 . -5
lots of a's/execp/aaaaaaaaaa .. (101) (comp) 2_235 +53% +1_187 0 x2.6 . 0 x2.6 . 562 +74% +414
lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 7_915 +18% +1_423 5 +12% +1 5 +12% +1 2_271 +18% +409
lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_756 -3% -161 3 +8% . 3 +8% . 1_871 . -5
media type match/exec/ foo/bar ; charset=UTF-8 (comp) 2_526 +50% +1_268 0 x2.1 +1 0 x2.1 +1 679 +56% +378
media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 7_285 -4% -258 5 -25% -1 5 -25% -1 2_459 -7% -175
media type match/exec/ foo/bar ; charset=UTF-8 (exec) 4_699 -28% -1_311 4 -46% -2 4 -46% -2 1_942 -28% -553
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_182 0 +96% . 0 +96% . 679 +56% +378
media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 7_256 -3% -195 4 -4% . 4 -4% . 2_461 -7% -175
media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 4_672 -28% -1_294 4 -39% -1 4 -39% -1 1_944 -28% -553
media type match/execp/ foo/bar ; charset=UTF-8 (comp) 2_526 +47% +1_189 0 +96% . 0 +96% . 679 +56% +378
media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 7_118 -3% -228 4 -6% . 4 -6% . 2_438 -7% -175
media type match/execp/ foo/bar ; charset=UTF-8 (exec) 4_513 -29% -1_319 4 -41% -2 4 -41% -2 1_921 -29% -553
memory 1:10 32_672 +11% +3_472 441 +1% +5 441 +1% +5 16_164 +3% +417
memory 1:100 1_118_623 +7% +72_896 52_418 +3% +1_329 52_160 +3% +1_329 231_195 . +327
memory 1:1000 102_761_165 +5% +5_115_898 4_816_835 . -6_566 4_811_961 . -6_566 18_863_081 . -573
memory 1:20 63_875 +9% +5_612 970 -1% -6 970 -1% -6 25_309 +2% +407
memory 1:40 174_551 +8% +13_144 3_596 +2% +75 3_596 +2% +75 54_695 +1% +387
memory 1:80 673_735 +7% +44_323 24_862 +2% +473 24_604 +2% +473 157_605 . +347
memory 2:10 35_086 +11% +3_795 524 +1% +5 524 +1% +5 17_764 +3% +449
memory 2:100 1_721_811 +2% +30_899 96_826 . -123 96_568 . -123 440_020 . +269
memory 2:1000 175_572_565 -6% -9_964_875 9_201_714 . +45_760 9_196_840 . +45_760 40_300_656 . -1_531
memory 2:20 74_262 +9% +6_855 1_480 -3% -46 1_480 -3% -46 32_734 +1% +429
memory 2:40 233_807 +8% +19_557 7_664 +11% +809 7_664 +11% +809 86_670 . +389
memory 2:80 1_151_523 +2% +18_398 66_458 . +102 66_200 . +102 290_280 . +309
repeated sequence re (comp) 446_678 +10% +45_188 34_998 -7% -2_421 34_998 -7% -2_421 136_175 +16% +21_453
repeated sequence re (comp+exec) 195_417_983 -17% -32_910_545 11_460_627 . -8_904 8_126_215 . -8_904 42_177_429 . +21_453
repeated sequence re (exec) 171_150_613 -13% -21_558_595 11_320_086 . +7_058 7_985_674 . +7_058 42_041_416 . .
shared prefixes (comp) 29_595 +73% +21_667 201 +74% +148 201 +74% +148 18_147 +48% +8_684
shared prefixes (comp+exec) 117_673 +23% +26_637 332 +48% +160 332 +48% +160 31_140 +28% +8_666
shared prefixes (exec) 81_629 +9% +7_117 39 . . 39 . . 13_155 . -18
split on whitespace (comp) 2_123 +57% +1_200 0 x3.1 . 0 x3.1 . 531 +66% +353
split on whitespace (comp+exec) 31_769 +14% +4_402 47 -2% -1 47 -2% -1 7_627 +4% +341
split on whitespace (exec) 29_946 +9% +2_561 43 +2% +1 43 +2% +1 7_258 . -12
string traversal from ocaml#210 (comp) 2_954 +57% +1_682 1 +90% +1 1 +90% +1 901 +77% +696
string traversal from ocaml#210 (comp+exec) 8_274_467 -10% -810_233 1_206 +5% +57 1_206 +5% +57 37_806 +2% +632
string traversal from ocaml#210 (exec) 7_635_452 -2% -188_517 1_253 -19% -240 1_253 -19% -240 37_067 . -64
tex gitignore/exec_opt (comp) 87_067 +63% +54_634 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
tex gitignore/exec_opt (comp+exec) 3_188_400 -7% -226_883 37_625 -7% -2_471 37_625 -7% -2_471 888_766 -6% -49_871
tex gitignore/exec_opt (exec) 3_066_236 -11% -322_463 30_486 -7% -2_159 30_486 -7% -2_159 851_090 -9% -72_531
tex gitignore/execp (comp) 87_089 +63% +54_728 1_232 x2.1 +1_382 1_232 x2.1 +1_382 37_838 +60% +22_660
tex gitignore/execp (comp+exec) 3_022_509 -7% -224_179 37_570 -2% -609 37_570 -2% -609 878_399 -6% -49_871
tex gitignore/execp (exec) 2_855_950 -9% -268_012 30_416 -7% -2_103 30_416 -7% -2_103 840_723 -9% -72_531
uri/exec/file:/random_crap (comp) 5_427 +38% +2_041 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec/file:/random_crap (comp+exec) 17_032 +12% +2_011 34 -2% -1 34 -2% -1 7_177 +10% +683
uri/exec/file:/random_crap (exec) 10_689 -1% -141 19 -5% -1 19 -5% -1 5_149 -1% -30
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_412 +39% +2_093 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_453 -18% -8_772 219 -33% -73 219 -33% -73 19_669 -17% -3_347
uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_285 -26% -10_398 173 -35% -60 173 -35% -60 17_641 -23% -4_060
uri/exec/https://google.com (comp) 5_426 +38% +2_038 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec/https://google.com (comp+exec) 29_170 -12% -3_360 97 -28% -27 97 -28% -27 12_914 -12% -1_572
uri/exec/https://google.com (exec) 22_490 -23% -5_226 66 -31% -21 66 -31% -21 10_886 -21% -2_285
uri/exec_opt/file:/random_crap (comp) 5_411 +39% +2_088 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec_opt/file:/random_crap (comp+exec) 17_104 +11% +1_856 35 +4% +1 35 +4% +1 7_179 +10% +683
uri/exec_opt/file:/random_crap (exec) 10_711 -2% -194 17 +7% +1 17 +7% +1 5_151 -1% -30
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_410 +39% +2_108 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 47_377 -18% -8_492 219 -33% -73 219 -33% -73 19_671 -17% -3_347
uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 40_125 -25% -10_153 146 -22% -32 146 -22% -32 17_643 -23% -4_060
uri/exec_opt/https://google.com (comp) 5_408 +38% +2_062 4 +36% +1 4 +36% +1 2_190 +33% +713
uri/exec_opt/https://google.com (comp+exec) 29_108 -11% -3_218 97 -29% -28 97 -29% -28 12_916 -12% -1_572
uri/exec_opt/https://google.com (exec) 22_512 -23% -5_203 67 -32% -22 67 -32% -22 10_888 -21% -2_285
uri/execp/file:/random_crap (comp) 5_400 +39% +2_119 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/file:/random_crap (comp+exec) 16_846 +11% +1_871 34 -1% . 34 -1% . 7_156 +10% +683
uri/execp/file:/random_crap (exec) 10_492 -3% -333 18 +3% +1 18 +3% +1 5_128 -1% -30
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_414 +39% +2_136 4 +34% +1 4 +34% +1 2_190 +33% +713
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 46_854 -18% -8_216 217 -31% -69 217 -31% -69 19_639 -17% -3_347
uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 39_594 -28% -10_955 169 -33% -56 169 -33% -56 17_611 -23% -4_060
uri/execp/https://google.com (comp) 5_417 +39% +2_104 4 +35% +1 4 +35% +1 2_190 +33% +713
uri/execp/https://google.com (comp+exec) 28_703 -11% -3_240 96 -28% -27 96 -28% -27 12_884 -12% -1_572
uri/execp/https://google.com (exec) 21_697 -25% -5_327 66 -31% -21 66 -31% -21 10_856 -21% -2_285
Benchmark compared to the previous commit: name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta . expensive color (comp+exec) 1_106_816 -62% -691_423 9_671 /5.2 -7_827 9_671 /5.2 -7_827 130_221 -36% -46_398 expensive color (comp) 1_073_147 -61% -656_264 9_671 /5.2 -7_827 9_671 /5.2 -7_827 130_221 -36% -46_398 20 zeroes/exec/00000000000000000000 (exec) 69_996 -25% -17_822 374 -3% -10 374 -3% -10 20_679 . . 20 zeroes/execp/00000000000000000000 (comp) 4_870 -10% -471 2 +2% . 2 +2% . 1_738 -2% -32 uri/exec_opt/https://google.com (comp) 7_416 -8% -568 6 -6% . 6 -6% . 2_919 -1% -37 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 3_468 -7% -258 1 +24% . 1 +24% . 982 . +2 uri/execp/https://google.com (comp) 7_396 -7% -505 6 -6% . 6 -6% . 2_919 -1% -37 kleene star compilation (comp) 3_102 -6% -201 0 +32% . 0 +32% . 833 . +3 20 zeroes/exec/00000000000000000000 (comp+exec) 59_743 -6% -3_707 392 . . 392 . . 22_255 . -32 lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 8_831 -6% -492 5 -25% -1 5 -25% -1 2_686 . +2 media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 3_725 -5% -195 1 +7% . 1 +7% . 1_062 . -3 uri/execp/file:/random_crap (comp) 7_271 -5% -374 6 -4% . 6 -4% . 2_919 -1% -37 media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 6_827 -5% -339 4 +6% . 4 +6% . 2_268 . -3 uri/exec/file:/random_crap (comp) 7_203 -5% -356 6 -4% . 6 -4% . 2_919 -1% -37 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 29_921 -5% -1_446 114 -1% -1 114 -1% -1 13_583 . . split on whitespace (comp) 3_274 -5% -152 1 +1% . 1 +1% . 889 . +3 uri/exec_opt/file:/random_crap (comp) 7_342 -5% -334 6 -6% . 6 -6% . 2_919 -1% -37 media type match/exec/ foo/bar ; charset=UTF-8 (comp) 3_630 -5% -165 1 +7% . 1 +7% . 1_062 . -3 tex gitignore/execp (exec) 2_589_010 -4% -116_489 28_313 . -30 28_313 . -30 768_192 . . tex gitignore/execp (comp+exec) 2_799_648 -4% -121_713 36_594 . -41 36_594 . -41 829_402 . -1_798 http/auto/all_gen (exec) 423_927 -4% -16_274 3_200 . . 3_200 . . 87_089 . . lots of a's/exec/aaaaaaaaaa .. (101) (comp) 3_350 -4% -127 1 +22% . 1 +22% . 982 . +2 string traversal from #210 (comp) 4_472 -4% -167 1 +38% . 1 +38% . 1_617 -1% -23 20 zeroes/execp/00000000000000000000 (comp+exec) 57_955 -4% -2_144 389 +1% +4 389 +1% +4 22_175 . -32 lots of a's/execp/aaaaaaaaaa .. (101) (comp) 3_352 -3% -110 1 +24% . 1 +24% . 982 . +2 http/manual/group (comp+exec) 345_066 -3% -11_000 1_147 -5% -53 1_147 -5% -53 53_494 . -56 kleene star compilation (exec) 72_819 -3% -2_292 1 +31% . 1 +31% . 930 . . lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_946 -3% -259 3 +55% +2 3 +55% +2 2_702 . +2 media type match/execp/ foo/bar ; charset=UTF-8 (comp) 3_595 -3% -96 1 +9% . 1 +9% . 1_062 . -3 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 38_071 -3% -1_009 149 +2% +3 149 +2% +3 16_338 . -37 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 7_203 -3% -182 6 -4% . 6 -4% . 2_919 -1% -37 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 37_252 -2% -919 150 -3% -4 150 -3% -4 16_308 . -37 http/manual/no group (comp) 10_782 -2% -264 10 -5% . 10 -5% . 3_815 -1% -56 tex gitignore/exec_opt (exec) 2_633_654 -2% -56_835 28_327 . . 28_327 . . 778_559 . . http/manual/group (exec) 323_623 -2% -6_836 987 . . 987 . . 49_964 . . http/manual/group (comp) 10_649 -2% -220 9 +4% . 9 +4% . 3_692 -2% -56 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 37_402 -2% -647 152 -3% -4 152 -3% -4 16_340 . -37 lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 5_740 -2% -98 4 . . 4 . . 1_884 . . uri/execp/file:/random_crap (comp+exec) 17_907 -2% -278 35 -2% -1 35 -2% -1 7_855 . -37 20 zeroes/exec/00000000000000000000 (comp) 4_561 -1% -68 2 +3% . 2 +3% . 1_738 -2% -32 media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 3_209 -1% -48 2 . . 2 . . 1_391 . . 20 zeroes/exec_opt/00000000000000000000 (exec) 52_434 -1% -755 369 . . 369 . . 20_681 . . uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 7_197 -1% -101 6 -4% . 6 -4% . 2_919 -1% -37 http/auto/execp no group (comp) 11_277 -1% -156 13 +8% +1 13 +8% +1 4_372 -1% -56 expensive color (exec) 141 -1% -2 0 -1% . 0 -1% . 162 . . uri/exec_opt/file:/random_crap (comp+exec) 18_028 -1% -241 33 +12% +4 33 +12% +4 7_878 . -37 http/manual/no group (exec) 2_429_939 -1% -29_165 65_989 . . 64_963 . . 566_247 . . media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 6_687 -1% -79 3 +21% +1 3 +21% +1 2_289 . -3 memory 2:20 77_998 -1% -877 1_477 -3% -47 1_477 -3% -47 33_171 . -3 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 7_188 -1% -69 6 -4% . 6 -4% . 2_919 -1% -37 tex gitignore/exec_opt (comp+exec) 2_787_674 -1% -22_370 36_251 +2% +575 36_251 +2% +575 839_769 . -1_798 uri/execp/https://google.com (comp+exec) 24_150 -1% -190 68 -3% -2 68 -3% -2 11_328 . -37 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 27_877 -1% -219 114 . . 114 . . 13_551 . . memory 2:80 1_122_771 -1% -8_581 66_424 . +27 66_166 . +27 290_597 . -3 memory 2:1000 160_069_895 -1% -971_603 9_246_981 . . 9_242_107 . . 40_299_133 . -3 memory 1:80 683_088 -1% -4_134 25_256 . +48 24_998 . +48 157_959 . -4 http/auto/all_gen (comp) 10_953 -1% -62 12 -38% -5 12 -38% -5 4_149 -1% -56 http/auto/execp no group (comp+exec) 4_352_194 -1% -22_301 141_946 . +11 140_920 . +11 1_175_271 . -56 memory 2:10 36_678 . -183 525 +2% +10 525 +2% +10 18_221 . -3 memory 1:1000 103_249_073 . -498_199 4_810_175 . +95 4_805_301 . +95 18_862_515 . -4 kleene star compilation (comp+exec) 73_182 . -336 2 +18% . 2 +18% . 1_601 . +3 lots of a's/exec/aaaaaaaaaa .. (101) (exec) 5_740 . -23 4 +1% . 4 +1% . 1_882 . . uri/execp/https://google.com (exec) 15_996 . -57 45 . . 45 . . 8_571 . . http/auto/all_gen (comp+exec) 436_052 . -1_351 3_565 . -14 3_565 . -14 91_076 . -56 repeated sequence re (comp+exec) 159_078_168 . -422_668 11_453_265 . -423 8_118_853 . -422 42_199_141 . +258 split on whitespace (exec) 29_508 . -74 45 . . 45 . . 7_246 . . memory 1:40 176_460 . -239 3_643 -1% -18 3_643 -1% -18 55_089 . -4 http/auto/execp no group (exec) 4_284_379 . -5_268 140_315 . . 139_289 . . 1_171_061 . . tex gitignore/execp (comp) 135_393 . -106 2_466 -12% -286 2_466 -12% -286 61_372 -3% -1_798 split on whitespace (comp+exec) 32_729 . +51 47 -6% -3 47 -6% -3 7_973 . +3 shared prefixes (exec) 83_386 . +178 39 . . 39 . . 13_137 . . uri/exec/https://google.com (exec) 16_369 . +53 45 . . 45 . . 8_601 . . memory 2:100 1_648_120 . +7_288 96_998 . -14 96_740 . -14 440_297 . -3 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_923 . +40 5 -2% . 5 -2% . 2_704 . +2 memory 1:20 65_448 . +298 941 +4% +35 941 +4% +35 25_723 . -4 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 28_011 . +136 113 . . 113 . . 13_581 . . shared prefixes (comp+exec) 135_504 +1% +746 495 -2% -9 495 -2% -9 40_183 -1% -278 repeated sequence re (exec) 143_068_933 +1% +895_023 11_327_143 . . 7_992_731 . . 42_041_416 . . media type match/exec/ foo/bar ; charset=UTF-8 (exec) 3_203 +1% +22 2 . . 2 . . 1_389 . . memory 1:100 1_130_975 +1% +9_976 51_907 . +43 51_649 . +43 231_529 . -4 string traversal from #210 (comp+exec) 6_861_271 +1% +73_365 1_084 +1% +15 1_084 +1% +15 38_458 . -23 uri/exec/https://google.com (comp) 7_277 +1% +80 6 -3% . 6 -3% . 2_919 -1% -37 uri/exec/https://google.com (comp+exec) 24_488 +1% +319 68 +4% +3 68 +4% +3 11_358 . -37 uri/exec_opt/https://google.com (comp+exec) 24_688 +1% +343 70 -2% -1 70 -2% -1 11_360 . -37 memory 1:10 34_068 +2% +513 365 +22% +81 365 +22% +81 16_588 . -4 string traversal from #210 (exec) 6_835_646 +2% +109_057 1_682 . . 1_682 . . 37_003 . . http/manual/no group (comp+exec) 2_424_685 +2% +38_692 66_513 . +34 65_487 . +34 569_900 . -56 shared prefixes (comp) 48_078 +2% +784 368 -6% -23 368 -6% -23 27_208 -1% -278 20 zeroes/exec_opt/00000000000000000000 (comp) 4_639 +2% +80 2 +3% . 2 +3% . 1_738 -2% -32 uri/exec/file:/random_crap (comp+exec) 17_875 +2% +310 34 . . 34 . . 7_876 . -37 memory 2:40 237_416 +2% +4_685 8_000 -1% -76 8_000 -1% -76 87_067 . -3 tex gitignore/exec_opt (comp) 132_961 +2% +2_807 2_478 -12% -298 2_478 -12% -298 61_372 -3% -1_798 media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 6_766 +2% +145 4 -3% . 4 -3% . 2_291 . -3 lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_202 +2% +114 4 -1% . 4 -1% . 1_866 . . 20 zeroes/exec_opt/00000000000000000000 (comp+exec) 55_771 +2% +1_248 406 -1% -6 406 -1% -6 22_257 . -32 uri/exec/file:/random_crap (exec) 9_892 +2% +226 18 . . 18 . . 5_119 . . uri/execp/file:/random_crap (exec) 9_711 +2% +234 18 . . 18 . . 5_098 . . uri/exec_opt/file:/random_crap (exec) 9_880 +3% +257 18 +1% . 18 +1% . 5_121 . . media type match/execp/ foo/bar ; charset=UTF-8 (exec) 3_016 +3% +92 2 +2% . 2 +2% . 1_368 . . repeated sequence re (comp) 475_729 +3% +14_657 32_157 +1% +299 32_157 +1% +299 157_887 . +258 uri/exec_opt/https://google.com (exec) 16_160 +3% +563 46 -1% . 46 -1% . 8_603 . . 20 zeroes/execp/00000000000000000000 (exec) 50_388 +9% +4_396 362 -1% -2 362 -1% -2 20_599 . . Benchmark compared to baseline in sorted by delta: name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta . uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 92_128 -61% -55_795 222 -34% -77 222 -34% -77 19_639 -17% -3_368 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 50_281 -45% -22_623 174 -35% -60 174 -35% -60 17_611 -23% -4_060 http/manual/no group (exec) 3_770_540 -36% -1_369_765 83_826 -21% -17_837 82_800 -22% -17_837 750_743 -25% -184_496 media type match/exec/ foo/bar ; charset=UTF-8 (exec) 4_828 -33% -1_603 4 -46% -2 4 -46% -2 1_942 -28% -553 media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 4_464 -29% -1_303 4 -45% -2 4 -45% -2 1_944 -28% -553 media type match/execp/ foo/bar ; charset=UTF-8 (exec) 4_371 -29% -1_263 4 -43% -2 4 -43% -2 1_921 -29% -553 http/auto/all_gen (exec) 569_892 -28% -162_239 5_893 -46% -2_693 5_893 -46% -2_693 137_350 -37% -50_261 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 39_274 -28% -11_127 174 -35% -61 174 -35% -61 17_641 -23% -4_060 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 38_209 -25% -9_734 176 -36% -63 176 -36% -63 17_643 -23% -4_060 http/auto/execp no group (comp+exec) 5_751_481 -25% -1_421_589 165_993 -14% -24_036 164_967 -15% -24_036 1_546_883 -24% -371_668 http/auto/all_gen (comp+exec) 573_808 -24% -139_107 6_561 -46% -3_010 6_561 -46% -3_010 139_848 -35% -48_828 http/manual/group (comp+exec) 439_884 -24% -105_818 2_081 -47% -988 2_081 -47% -988 80_418 -34% -26_980 http/auto/execp no group (exec) 5_612_073 -24% -1_332_962 165_882 -15% -25_568 164_856 -16% -25_568 1_544_161 -24% -373_100 http/manual/group (exec) 411_390 -23% -94_604 1_879 -47% -892 1_879 -47% -892 78_377 -36% -28_413 uri/execp/https://google.com (exec) 20_687 -23% -4_749 67 -32% -21 67 -32% -21 10_856 -21% -2_285 http/manual/no group (comp+exec) 3_180_848 -23% -717_470 84_408 -21% -17_861 83_382 -21% -17_861 752_908 -24% -183_064 kleene star compilation (exec) 90_618 -22% -20_091 1 -10% . 1 -10% . 933 . -3 uri/exec/https://google.com (exec) 20_839 -21% -4_417 68 -33% -23 68 -33% -23 10_886 -21% -2_285 uri/exec_opt/https://google.com (exec) 20_787 -20% -4_063 68 -33% -22 68 -33% -22 10_888 -21% -2_285 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 45_107 -19% -8_352 220 -33% -72 220 -33% -72 19_671 -17% -3_368 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 44_505 -17% -7_443 219 -31% -67 219 -31% -67 19_669 -17% -3_368 kleene star compilation (comp+exec) 87_221 -16% -14_375 2 +55% +1 2 +55% +1 1_247 +29% +357 20 zeroes/exec/00000000000000000000 (comp+exec) 66_112 -15% -10_077 393 . -1 393 . -1 21_520 +3% +703 memory 1:20 75_866 -13% -10_120 990 -1% -14 990 -1% -14 25_309 +2% +410 uri/execp/https://google.com (comp+exec) 27_589 -13% -3_629 96 -31% -30 96 -31% -30 12_884 -12% -1_593 string traversal from #210 (comp+exec) 7_870_136 -12% -935_500 1_450 -24% -351 1_450 -24% -351 37_806 +2% +629 media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 7_358 -12% -870 5 -11% . 5 -11% . 2_438 -7% -173 uri/exec/https://google.com (comp+exec) 28_092 -12% -3_285 96 -26% -25 96 -26% -25 12_914 -12% -1_593 string traversal from #210 (exec) 7_792_112 -11% -847_409 1_002 +68% +680 1_002 +68% +680 37_067 . -64 media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 7_349 -10% -742 6 -33% -2 6 -33% -2 2_459 -7% -173 uri/exec_opt/https://google.com (comp+exec) 27_840 -10% -2_809 98 -29% -29 98 -29% -29 12_916 -12% -1_593 tex gitignore/exec_opt (exec) 2_851_694 -10% -274_875 30_705 -8% -2_378 30_705 -8% -2_378 851_090 -9% -72_531 lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 6_217 -9% -574 3 +8% . 3 +8% . 1_889 . -5 lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_811 -9% -495 4 -4% . 4 -4% . 1_871 . -5 lots of a's/exec/aaaaaaaaaa .. (101) (exec) 6_238 -8% -521 3 +1% . 3 +1% . 1_887 . -5 tex gitignore/execp (exec) 2_683_837 -8% -211_316 30_718 -8% -2_435 30_718 -8% -2_435 840_723 -9% -72_531 memory 1:10 37_217 -7% -2_637 446 . . 446 . . 16_164 +3% +420 tex gitignore/exec_opt (comp+exec) 2_974_809 -7% -209_504 37_842 -3% -1_015 37_842 -3% -1_015 888_766 -6% -50_795 memory 2:80 1_197_252 -7% -83_063 66_887 -1% -436 66_629 -1% -436 290_280 . +314 20 zeroes/exec_opt/00000000000000000000 (exec) 55_508 -7% -3_828 368 . +1 368 . +1 20_702 . -21 tex gitignore/execp (comp+exec) 2_863_704 -6% -185_769 37_873 -3% -1_320 37_873 -3% -1_320 878_399 -6% -50_795 memory 1:80 725_285 -6% -46_331 25_202 . +101 24_944 . +101 157_605 . +350 split on whitespace (exec) 30_848 -5% -1_414 44 +1% . 44 +1% . 7_258 . -12 memory 1:40 183_733 -4% -7_512 3_612 . +13 3_612 . +13 54_695 +1% +390 memory 1:1000 107_033_634 -4% -4_282_761 4_815_591 . -5_321 4_810_717 . -5_321 18_863_081 . -570 20 zeroes/execp/00000000000000000000 (comp+exec) 58_033 -4% -2_222 397 -1% -4 397 -1% -4 21_440 +3% +703 20 zeroes/exec_opt/00000000000000000000 (comp+exec) 59_229 -4% -2_210 398 . +1 398 . +1 21_522 +3% +703 repeated sequence re (exec) 149_191_045 -4% -5_227_089 11_327_143 . . 7_992_731 . . 42_041_416 . . memory 1:100 1_176_267 -3% -35_317 53_056 -2% -1_107 52_798 -2% -1_107 231_195 . +330 20 zeroes/exec/00000000000000000000 (exec) 53_668 -3% -1_494 371 -2% -8 371 -2% -8 20_700 . -21 memory 2:20 79_328 -3% -2_208 1_550 -8% -120 1_550 -8% -120 32_734 +1% +434 memory 2:1000 163_594_532 -3% -4_496_241 9_264_357 . -17_377 9_259_483 . -17_377 40_300_656 . -1_526 repeated sequence re (comp+exec) 162_459_230 -2% -3_803_730 11_452_833 . +10 8_118_420 . +10 42_177_429 . +21_970 memory 2:100 1_684_082 -2% -28_674 97_112 . -128 96_854 . -128 440_020 . +274 memory 2:10 37_109 -2% -614 525 +2% +10 525 +2% +10 17_764 +3% +454 memory 2:40 244_915 -1% -2_814 7_885 +1% +39 7_885 +1% +39 86_670 . +394 shared prefixes (exec) 84_515 -1% -951 40 -2% -1 40 -2% -1 13_155 . -18 20 zeroes/execp/00000000000000000000 (exec) 55_278 -1% -494 365 -1% -5 365 -1% -5 20_620 . -21 uri/exec_opt/file:/random_crap (exec) 10_221 -1% -85 19 -5% -1 19 -5% -1 5_151 -1% -30 uri/exec/file:/random_crap (exec) 10_166 . -48 19 -7% -1 19 -7% -1 5_149 -1% -30 expensive color (exec) 140 . . 0 -1% . 0 -1% . 162 . . media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 6_910 . . 5 -22% -1 5 -22% -1 2_461 -7% -173 split on whitespace (comp+exec) 32_777 . +3 46 -4% -2 46 -4% -2 7_627 +5% +349 uri/execp/file:/random_crap (exec) 9_919 . +26 19 -1% . 19 -1% . 5_128 -1% -30 lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_366 +4% +321 5 +3% . 5 +3% . 2_287 +18% +417 lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 7_956 +5% +382 5 -10% . 5 -10% . 2_271 +18% +417 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_398 +7% +565 5 +11% +1 5 +11% +1 2_289 +18% +417 uri/exec/file:/random_crap (comp+exec) 16_183 +12% +2_002 35 -1% . 35 -1% . 7_177 +9% +662 uri/exec_opt/file:/random_crap (comp+exec) 15_686 +13% +2_102 34 +10% +3 34 +10% +3 7_179 +9% +662 uri/execp/file:/random_crap (comp+exec) 15_538 +13% +2_091 35 -2% -1 35 -2% -1 7_156 +9% +662 shared prefixes (comp+exec) 117_210 +16% +19_040 336 +44% +149 336 +44% +149 31_140 +28% +8_765 repeated sequence re (comp) 415_574 +18% +74_812 32_982 -2% -526 32_982 -2% -526 136_175 +16% +21_970 uri/execp/file:/random_crap (comp) 5_135 +34% +1_762 4 +26% +1 4 +26% +1 2_190 +32% +692 uri/exec_opt/https://google.com (comp) 5_064 +35% +1_784 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec/file:/random_crap (comp) 5_052 +36% +1_795 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/execp/https://google.com (comp) 5_075 +36% +1_816 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_183 +37% +1_937 4 +25% +1 4 +25% +1 2_190 +32% +692 media type match/exec/ foo/bar ; charset=UTF-8 (comp) 2_517 +38% +949 1 +84% . 1 +84% . 679 +56% +380 media type match/execp/ foo/bar ; charset=UTF-8 (comp) 2_529 +38% +970 1 +85% . 1 +85% . 679 +56% +380 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_066 +39% +1_955 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec_opt/file:/random_crap (comp) 5_042 +39% +1_966 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_036 +41% +2_060 4 +25% +1 4 +25% +1 2_190 +32% +692 lots of a's/exec/aaaaaaaaaa .. (101) (comp) 2_274 +42% +949 0 x3.5 +1 0 x3.5 +1 562 +75% +422 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 2_238 +43% +971 0 x3.5 +1 0 x3.5 +1 562 +75% +422 split on whitespace (comp) 2_178 +43% +945 0 x2.3 . 0 x2.3 . 531 +68% +361 lots of a's/execp/aaaaaaaaaa .. (101) (comp) 2_234 +45% +1_007 0 x3.5 +1 0 x3.5 +1 562 +75% +422 20 zeroes/exec/00000000000000000000 (comp) 3_096 +45% +1_397 1 x2.3 +1 1 x2.3 +1 982 +74% +724 uri/exec/https://google.com (comp) 5_040 +46% +2_317 4 +28% +1 4 +28% +1 2_190 +32% +692 kleene star compilation (comp) 1_961 +48% +940 0 x2.6 . 0 x2.6 . 476 +76% +360 20 zeroes/execp/00000000000000000000 (comp) 2_971 +48% +1_427 1 x2.3 +1 1 x2.3 +1 982 +74% +724 media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 2_368 +49% +1_162 1 +82% . 1 +82% . 679 +56% +380 20 zeroes/exec_opt/00000000000000000000 (comp) 3_077 +53% +1_643 1 x2.3 +1 1 x2.3 +1 982 +74% +724 string traversal from #210 (comp) 2_775 +55% +1_531 1 x2.4 +1 1 x2.4 +1 901 +77% +693 http/manual/group (comp) 6_581 +58% +3_849 5 x2.0 +5 5 x2.0 +5 2_203 +65% +1_433 shared prefixes (comp) 29_938 +63% +18_924 208 +65% +136 208 +65% +136 18_147 +48% +8_783 tex gitignore/execp (comp) 79_824 +69% +55_463 1_238 +76% +942 1_238 +76% +942 37_838 +57% +21_736 tex gitignore/exec_opt (comp) 79_775 +70% +55_992 1_238 +76% +942 1_238 +76% +942 37_838 +57% +21_736 http/auto/execp no group (comp) 6_413 +73% +4_707 8 +68% +6 8 +68% +6 2_884 +50% +1_432 http/auto/all_gen (comp) 6_217 +75% +4_675 7 +15% +1 7 +15% +1 2_660 +54% +1_433 http/manual/no group (comp) 5_880 +79% +4_639 5 +71% +4 5 +71% +4 2_327 +62% +1_432 expensive color (comp+exec) 53_400 x7.8 +361_993 374 x4.9 +1_470 374 x4.9 +1_470 23_969 x3.5 +59_854 expensive color (comp) 52_153 x8.0 +364_729 372 x5.0 +1_472 372 x5.0 +1_472 23_969 x3.5 +59_854 Benchmark compared to baseline sorted by name: name ns/run delta . majorW/run delta . promotedW/run delta . minorW/run delta . 20 zeroes/exec/00000000000000000000 (comp) 3_096 +45% +1_397 1 x2.3 +1 1 x2.3 +1 982 +74% +724 20 zeroes/exec/00000000000000000000 (comp+exec) 66_112 -15% -10_077 393 . -1 393 . -1 21_520 +3% +703 20 zeroes/exec/00000000000000000000 (exec) 53_668 -3% -1_494 371 -2% -8 371 -2% -8 20_700 . -21 20 zeroes/exec_opt/00000000000000000000 (comp) 3_077 +53% +1_643 1 x2.3 +1 1 x2.3 +1 982 +74% +724 20 zeroes/exec_opt/00000000000000000000 (comp+exec) 59_229 -4% -2_210 398 . +1 398 . +1 21_522 +3% +703 20 zeroes/exec_opt/00000000000000000000 (exec) 55_508 -7% -3_828 368 . +1 368 . +1 20_702 . -21 20 zeroes/execp/00000000000000000000 (comp) 2_971 +48% +1_427 1 x2.3 +1 1 x2.3 +1 982 +74% +724 20 zeroes/execp/00000000000000000000 (comp+exec) 58_033 -4% -2_222 397 -1% -4 397 -1% -4 21_440 +3% +703 20 zeroes/execp/00000000000000000000 (exec) 55_278 -1% -494 365 -1% -5 365 -1% -5 20_620 . -21 expensive color (comp) 52_153 x8.0 +364_729 372 x5.0 +1_472 372 x5.0 +1_472 23_969 x3.5 +59_854 expensive color (comp+exec) 53_400 x7.8 +361_993 374 x4.9 +1_470 374 x4.9 +1_470 23_969 x3.5 +59_854 expensive color (exec) 140 . . 0 -1% . 0 -1% . 162 . . http/auto/all_gen (comp) 6_217 +75% +4_675 7 +15% +1 7 +15% +1 2_660 +54% +1_433 http/auto/all_gen (comp+exec) 573_808 -24% -139_107 6_561 -46% -3_010 6_561 -46% -3_010 139_848 -35% -48_828 http/auto/all_gen (exec) 569_892 -28% -162_239 5_893 -46% -2_693 5_893 -46% -2_693 137_350 -37% -50_261 http/auto/execp no group (comp) 6_413 +73% +4_707 8 +68% +6 8 +68% +6 2_884 +50% +1_432 http/auto/execp no group (comp+exec) 5_751_481 -25% -1_421_589 165_993 -14% -24_036 164_967 -15% -24_036 1_546_883 -24% -371_668 http/auto/execp no group (exec) 5_612_073 -24% -1_332_962 165_882 -15% -25_568 164_856 -16% -25_568 1_544_161 -24% -373_100 http/manual/group (comp) 6_581 +58% +3_849 5 x2.0 +5 5 x2.0 +5 2_203 +65% +1_433 http/manual/group (comp+exec) 439_884 -24% -105_818 2_081 -47% -988 2_081 -47% -988 80_418 -34% -26_980 http/manual/group (exec) 411_390 -23% -94_604 1_879 -47% -892 1_879 -47% -892 78_377 -36% -28_413 http/manual/no group (comp) 5_880 +79% +4_639 5 +71% +4 5 +71% +4 2_327 +62% +1_432 http/manual/no group (comp+exec) 3_180_848 -23% -717_470 84_408 -21% -17_861 83_382 -21% -17_861 752_908 -24% -183_064 http/manual/no group (exec) 3_770_540 -36% -1_369_765 83_826 -21% -17_837 82_800 -22% -17_837 750_743 -25% -184_496 kleene star compilation (comp) 1_961 +48% +940 0 x2.6 . 0 x2.6 . 476 +76% +360 kleene star compilation (comp+exec) 87_221 -16% -14_375 2 +55% +1 2 +55% +1 1_247 +29% +357 kleene star compilation (exec) 90_618 -22% -20_091 1 -10% . 1 -10% . 933 . -3 lots of a's/exec/aaaaaaaaaa .. (101) (comp) 2_274 +42% +949 0 x3.5 +1 0 x3.5 +1 562 +75% +422 lots of a's/exec/aaaaaaaaaa .. (101) (comp+exec) 8_366 +4% +321 5 +3% . 5 +3% . 2_287 +18% +417 lots of a's/exec/aaaaaaaaaa .. (101) (exec) 6_238 -8% -521 3 +1% . 3 +1% . 1_887 . -5 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp) 2_238 +43% +971 0 x3.5 +1 0 x3.5 +1 562 +75% +422 lots of a's/exec_opt/aaaaaaaaaa .. (101) (comp+exec) 8_398 +7% +565 5 +11% +1 5 +11% +1 2_289 +18% +417 lots of a's/exec_opt/aaaaaaaaaa .. (101) (exec) 6_217 -9% -574 3 +8% . 3 +8% . 1_889 . -5 lots of a's/execp/aaaaaaaaaa .. (101) (comp) 2_234 +45% +1_007 0 x3.5 +1 0 x3.5 +1 562 +75% +422 lots of a's/execp/aaaaaaaaaa .. (101) (comp+exec) 7_956 +5% +382 5 -10% . 5 -10% . 2_271 +18% +417 lots of a's/execp/aaaaaaaaaa .. (101) (exec) 5_811 -9% -495 4 -4% . 4 -4% . 1_871 . -5 media type match/exec/ foo/bar ; charset=UTF-8 (comp) 2_517 +38% +949 1 +84% . 1 +84% . 679 +56% +380 media type match/exec/ foo/bar ; charset=UTF-8 (comp+exec) 7_349 -10% -742 6 -33% -2 6 -33% -2 2_459 -7% -173 media type match/exec/ foo/bar ; charset=UTF-8 (exec) 4_828 -33% -1_603 4 -46% -2 4 -46% -2 1_942 -28% -553 media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp) 2_368 +49% +1_162 1 +82% . 1 +82% . 679 +56% +380 media type match/exec_opt/ foo/bar ; charset=UTF-8 (comp+exec) 6_910 . . 5 -22% -1 5 -22% -1 2_461 -7% -173 media type match/exec_opt/ foo/bar ; charset=UTF-8 (exec) 4_464 -29% -1_303 4 -45% -2 4 -45% -2 1_944 -28% -553 media type match/execp/ foo/bar ; charset=UTF-8 (comp) 2_529 +38% +970 1 +85% . 1 +85% . 679 +56% +380 media type match/execp/ foo/bar ; charset=UTF-8 (comp+exec) 7_358 -12% -870 5 -11% . 5 -11% . 2_438 -7% -173 media type match/execp/ foo/bar ; charset=UTF-8 (exec) 4_371 -29% -1_263 4 -43% -2 4 -43% -2 1_921 -29% -553 memory 1:10 37_217 -7% -2_637 446 . . 446 . . 16_164 +3% +420 memory 1:100 1_176_267 -3% -35_317 53_056 -2% -1_107 52_798 -2% -1_107 231_195 . +330 memory 1:1000 107_033_634 -4% -4_282_761 4_815_591 . -5_321 4_810_717 . -5_321 18_863_081 . -570 memory 1:20 75_866 -13% -10_120 990 -1% -14 990 -1% -14 25_309 +2% +410 memory 1:40 183_733 -4% -7_512 3_612 . +13 3_612 . +13 54_695 +1% +390 memory 1:80 725_285 -6% -46_331 25_202 . +101 24_944 . +101 157_605 . +350 memory 2:10 37_109 -2% -614 525 +2% +10 525 +2% +10 17_764 +3% +454 memory 2:100 1_684_082 -2% -28_674 97_112 . -128 96_854 . -128 440_020 . +274 memory 2:1000 163_594_532 -3% -4_496_241 9_264_357 . -17_377 9_259_483 . -17_377 40_300_656 . -1_526 memory 2:20 79_328 -3% -2_208 1_550 -8% -120 1_550 -8% -120 32_734 +1% +434 memory 2:40 244_915 -1% -2_814 7_885 +1% +39 7_885 +1% +39 86_670 . +394 memory 2:80 1_197_252 -7% -83_063 66_887 -1% -436 66_629 -1% -436 290_280 . +314 repeated sequence re (comp) 415_574 +18% +74_812 32_982 -2% -526 32_982 -2% -526 136_175 +16% +21_970 repeated sequence re (comp+exec) 162_459_230 -2% -3_803_730 11_452_833 . +10 8_118_420 . +10 42_177_429 . +21_970 repeated sequence re (exec) 149_191_045 -4% -5_227_089 11_327_143 . . 7_992_731 . . 42_041_416 . . shared prefixes (comp) 29_938 +63% +18_924 208 +65% +136 208 +65% +136 18_147 +48% +8_783 shared prefixes (comp+exec) 117_210 +16% +19_040 336 +44% +149 336 +44% +149 31_140 +28% +8_765 shared prefixes (exec) 84_515 -1% -951 40 -2% -1 40 -2% -1 13_155 . -18 split on whitespace (comp) 2_178 +43% +945 0 x2.3 . 0 x2.3 . 531 +68% +361 split on whitespace (comp+exec) 32_777 . +3 46 -4% -2 46 -4% -2 7_627 +5% +349 split on whitespace (exec) 30_848 -5% -1_414 44 +1% . 44 +1% . 7_258 . -12 string traversal from #210 (comp) 2_775 +55% +1_531 1 x2.4 +1 1 x2.4 +1 901 +77% +693 string traversal from #210 (comp+exec) 7_870_136 -12% -935_500 1_450 -24% -351 1_450 -24% -351 37_806 +2% +629 string traversal from #210 (exec) 7_792_112 -11% -847_409 1_002 +68% +680 1_002 +68% +680 37_067 . -64 tex gitignore/exec_opt (comp) 79_775 +70% +55_992 1_238 +76% +942 1_238 +76% +942 37_838 +57% +21_736 tex gitignore/exec_opt (comp+exec) 2_974_809 -7% -209_504 37_842 -3% -1_015 37_842 -3% -1_015 888_766 -6% -50_795 tex gitignore/exec_opt (exec) 2_851_694 -10% -274_875 30_705 -8% -2_378 30_705 -8% -2_378 851_090 -9% -72_531 tex gitignore/execp (comp) 79_824 +69% +55_463 1_238 +76% +942 1_238 +76% +942 37_838 +57% +21_736 tex gitignore/execp (comp+exec) 2_863_704 -6% -185_769 37_873 -3% -1_320 37_873 -3% -1_320 878_399 -6% -50_795 tex gitignore/execp (exec) 2_683_837 -8% -211_316 30_718 -8% -2_435 30_718 -8% -2_435 840_723 -9% -72_531 uri/exec/file:/random_crap (comp) 5_052 +36% +1_795 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec/file:/random_crap (comp+exec) 16_183 +12% +2_002 35 -1% . 35 -1% . 7_177 +9% +662 uri/exec/file:/random_crap (exec) 10_166 . -48 19 -7% -1 19 -7% -1 5_149 -1% -30 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_066 +39% +1_955 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 44_505 -17% -7_443 219 -31% -67 219 -31% -67 19_669 -17% -3_368 uri/exec/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 39_274 -28% -11_127 174 -35% -61 174 -35% -61 17_641 -23% -4_060 uri/exec/https://google.com (comp) 5_040 +46% +2_317 4 +28% +1 4 +28% +1 2_190 +32% +692 uri/exec/https://google.com (comp+exec) 28_092 -12% -3_285 96 -26% -25 96 -26% -25 12_914 -12% -1_593 uri/exec/https://google.com (exec) 20_839 -21% -4_417 68 -33% -23 68 -33% -23 10_886 -21% -2_285 uri/exec_opt/file:/random_crap (comp) 5_042 +39% +1_966 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec_opt/file:/random_crap (comp+exec) 15_686 +13% +2_102 34 +10% +3 34 +10% +3 7_179 +9% +662 uri/exec_opt/file:/random_crap (exec) 10_221 -1% -85 19 -5% -1 19 -5% -1 5_151 -1% -30 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_036 +41% +2_060 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 45_107 -19% -8_352 220 -33% -72 220 -33% -72 19_671 -17% -3_368 uri/exec_opt/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 38_209 -25% -9_734 176 -36% -63 176 -36% -63 17_643 -23% -4_060 uri/exec_opt/https://google.com (comp) 5_064 +35% +1_784 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/exec_opt/https://google.com (comp+exec) 27_840 -10% -2_809 98 -29% -29 98 -29% -29 12_916 -12% -1_593 uri/exec_opt/https://google.com (exec) 20_787 -20% -4_063 68 -33% -22 68 -33% -22 10_888 -21% -2_285 uri/execp/file:/random_crap (comp) 5_135 +34% +1_762 4 +26% +1 4 +26% +1 2_190 +32% +692 uri/execp/file:/random_crap (comp+exec) 15_538 +13% +2_091 35 -2% -1 35 -2% -1 7_156 +9% +662 uri/execp/file:/random_crap (exec) 9_919 . +26 19 -1% . 19 -1% . 5_128 -1% -30 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp) 5_183 +37% +1_937 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (comp+exec) 92_128 -61% -55_795 222 -34% -77 222 -34% -77 19_639 -17% -3_368 uri/execp/http://yahoo.com/xxx/yyy?query=param&one=two (exec) 50_281 -45% -22_623 174 -35% -60 174 -35% -60 17_611 -23% -4_060 uri/execp/https://google.com (comp) 5_075 +36% +1_816 4 +25% +1 4 +25% +1 2_190 +32% +692 uri/execp/https://google.com (comp+exec) 27_589 -13% -3_629 96 -31% -30 96 -31% -30 12_884 -12% -1_593 uri/execp/https://google.com (exec) 20_687 -23% -4_749 67 -32% -21 67 -32% -21 10_856 -21% -2_285
This makes the main loops about twice as fast by removing one memory access on the critical path and reducing the number of instructions executed per iteration.
The downside is that we have to use
Obj.magicand unsafe array/string accesses for that.Indeed, we currently have two memory access on the critical path:
let st = st.next.[..]. The idea is to remove the first memory access:let st = st.[...]. But thenstno longer directly contains information on the current state of the automata but instead becomes an array of possible subsequent states, and we have to find a way to get information about the current state somehow. This is achieved by putting this information at index 0 of the array, but we need to useObj.magicfor that.Once the critical path is shortened, it is no longer a bottleneck and we need to reduce the number of instructions executed by iteration as well. Hence the use of unsafe array/string accesses.