You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy chunks of the input to the output buffer with, up to the shorter
of the available buffer space and the "null-free" portion of the remaining
string. Actually "null-free" here means not containing any denormalised
two-byte encodings starting with 0xC0 (so possibly also other ASCII
bytes if the UTF-8 encoding is oddball).
This substantially improves performance, with just one "15%" increase
that looks like a spurious measurement error (perhaps code layout
difference artefact).
UTF-8 String (12B): OK
16.7 ns ± 1.3 ns, 60% less than baseline
UTF-8 String (64B, one null): OK
22.6 ns ± 1.3 ns, 87% less than baseline
UTF-8 String (64B, one null, no shared work): OK
30.1 ns ± 2.6 ns, 83% less than baseline
UTF-8 String (64B, half nulls): OK
92.6 ns ± 5.3 ns, 49% less than baseline
UTF-8 String (64B, all nulls): OK
76.3 ns ± 4.5 ns, 57% less than baseline
UTF-8 String (64B, all nulls, no shared work): OK
82.3 ns ± 5.6 ns, 54% less than baseline
ASCII String (12B): OK
6.50 ns ± 326 ps, 76% less than baseline
ASCII String (64B): OK
8.03 ns ± 334 ps, 94% less than baseline
AsciiLit: OK
8.02 ns ± 648 ps, 94% less than baseline
Utf8Lit: OK
21.8 ns ± 1.3 ns, 88% less than baseline
strLit: OK
8.90 ns ± 788 ps, 94% less than baseline
stringUtf8: OK
22.4 ns ± 1.3 ns, 87% less than baseline
strLitInline: OK
8.26 ns ± 676 ps, 94% less than baseline
utf8LitInline: OK
23.2 ns ± 1.3 ns, 87% less than baseline
foldMap byteStringInsert (10000): OK
46.0 μs ± 4.0 μs, 15% less than baseline
--> lazyByteStringHex (10000): OK
--> 4.74 μs ± 337 ns, 15% more than baseline
foldMap integerDec (small) (10000): OK
205 μs ± 12 μs, 9% less than baseline
char8 (10000): OK
2.58 μs ± 234 ns, 30% less than baseline
foldMap (left-assoc) (10000): OK
73.2 μs ± 2.9 μs, 54% less than baseline
foldMap (right-assoc) (10000): OK
43.0 μs ± 4.2 μs, 65% less than baseline
foldMap [manually fused, left-assoc] (10000): OK
81.4 μs ± 5.3 μs, 48% less than baseline
foldMap [manually fused, right-assoc] (10000): OK
47.3 μs ± 785 ns, 61% less than baseline
0 commit comments