Conversation
It somehow ends up being faster, since otherwise we frequently allocate boxed integers from the unpacked field.
It is accessed pretty often, so it is faster to have it ready.
aspiwack
left a comment
There was a problem hiding this comment.
I guess that the next step is committing these benchmarks.
|
Hello! Just a random thought, are |
This was a good point, I think they should be inlined. I can observe from the core output that both the callback passed to But they make sense and make the core output prettier, so I commited those. |
75192a2 to
f3fd127
Compare
Just some minor optimisations for our HashMap implementation. It contains
a few unrelated small changes, so reviewing each individual commit might
be easier.
When I compare this against
Data.HashMap.Strict, the results change basedon the input (likely based on the hash distribution of the key). I need to investigate
this more. Just as reference, here're the functions I am comparing (
Keyis just anewtype wrapper around
Int):I did not include the benchmark on this PR, since it looks a bit different
than our existing HashMap benchmarks. I have to combine them together at
one point.