leapfrog icon indicating copy to clipboard operation
leapfrog copied to clipboard

Use #![no_std] by default

Open vtta opened this issue 9 months ago • 1 comments

#![no_std] makes this crate usable for kernel development.

vtta avatar Oct 01 '23 12:10 vtta

Hi,

Thanks for this, I'm generally in favour of these changes, and mostly looks good.

I'm slightly unsure of the change to the default hasher, however. I would like to make sure that the default hasher is good enough for most use cases, and compares well to the default hasher in std, since most users will expect at least that level of performance.

It would be good to add a test/benchmark over use cases with representative data, that will test the number of collisions of the different hashers (including the default in std), and then choose based on that.

Something like what was done here.

From that comment (the dataset sizes are too small, especially for numbers we would want to measure collisions up to at least u32::MAX and ideally to u64::MAX), it seems that FNV-1a or Murmur3 would be better choices for the default hasher, but adding a test/benchmark would could be extended with additional data would be great, so that it's clear why the default hasher was chosen.

robclu avatar Oct 02 '23 08:10 robclu