Bruce MacNaughton
Bruce MacNaughton
Here are the benchmarks I ran with criterion; they were focused only on checking character sequences for whitespace. All multiple-character benchmarks, other than issue-38, loop through sequentially increasing characters. issue-38...
the benchmark code: https://github.com/bmacnaughton/is_whitespace/tree/main/benches
> Edit: Ah, I see the generated code is included and not much larger. @the8472 i was aware that this made the code slightly larger because the 256-byte table is...
> How does this compare to implementing is_whitespace as a match of just the codepoints that are relevant? (It's a very small set of them). I'd expect that to have...
updated benchmarks with new key. my quick-and-dirty benchmark was a little bit off, it appears. my interpretation - the `mapped-if` (see below) approach is overall best losing to `match` only...
i'm not sure i follow - issue-38 is 388619 bytes of json, addresses is 29986 bytes of json. what size are you suggesting is the minimum that makes sense?
ok, i've found this information, does it align with what you're thinking? l1i - 8x32kb (262144) l1d - 8x32kb (262144) l2 - 8x256kb (2_097_152) l3 - 16mb (16_777_216) @bjorn3 -...
@thomcc - the table definitely adds to the size of `mapped-if` but it's 23 instructions while `match` is 28 instructions. i'm not familiar with the details of the icache, but...
> that isn't measured when benchmarking this code in isolation. @bjorn3 - i could use a bit of guidance here. i'm not sure how to balance the cache costs of...
> I was more referring to the current implementation, which is significantly larger than either in icache. that's what got me started on this. i wanted to understand how the...