These are chat archives for boostorg/hana

29th
Feb 2016
Louis Dionne
@ldionne
Feb 29 2016 15:44
@ricejasonf I managed to significantly cut down the compile-times for creating maps. If hana::make_map expects all keys to be distinct, and all their hashes not to collide, then we can create all the buckets in one pass, since we know each bucket will contain one and only one key.
And it seems like this is a reasonable assumption (no hash collisions), since 90% of the time we’re mapping distinct types, distinct integers, distinct strings or something else that won’t have collisions. If you need to allow for collisions, then one can use hana::to_map or use hana::insert recursively.
I’m running the tests now, but if it passes then I’m definitely making the change.
Do you think it’s stupid to have make_map require distinct hashes?
If I’m not forgetting something obvious, it seems like it’s totally reasonable.
Louis Dionne
@ldionne
Feb 29 2016 15:58
@ricejasonf All tests are passing (after a tweak to your hash_collision.cpp test). I’ll wait for your thumbs up and I’ll push the change.
Jason Rice
@ricejasonf
Feb 29 2016 16:10
👍🏻 Sounds great to me. practical
Louis Dionne
@ldionne
Feb 29 2016 16:12
Ok, I’ll go forward with it.
Jason Rice
@ricejasonf
Feb 29 2016 16:59
:+1: