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
Replace dead overflow checks with assertions and avoid indirect call overhead
We allocate twice the input length, and every input character results in
either 1 or 2 output bytes, so we cannot overflow.
By using an enum, and a switch table (which will be efficiently compiled
into a jump table), we can avoid the pessimistic code generation of the
indirect calls.
With this I get the following runtime for the test script in GH-13466 on
my i7-4790, which is around 1.25x faster.
Time (mean ± σ): 250.9 ms ± 1.6 ms [User: 248.4 ms, System: 2.0 ms]
Range (min … max): 248.9 ms … 254.4 ms 11 runs
0 commit comments