foxik / hashmap

This package is deprecated in favor of unordered-containers.
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

revmap this package? #1

Open winterland1989 opened 8 years ago

winterland1989 commented 8 years ago

From unordered-containers's benchmark and other places, it seems hashmap is faster at inserting but slower at reading, maybe more suitable under some situations?

I'd like to revmap this package with more benchmark and add Strict/Lazy modules, does that make sense? @foxik

foxik commented 8 years ago

As documented, I consider this package to be deprecated (and not to be developed further).

The problem is that it uses the same module names as unordered-containers. If you are interested in using the algorithms from hashmap package, probably the best way would be to create a new package with new module names (not to clash with unordered-containers).

But maybe I see it wrongly -- please do not hesitate to discuss your reasons here.

winterland1989 commented 8 years ago

I would say keep same name and same API is actually a nice thing, user can easily switch package and do benchmark without changing code, even if someone really need use both, ghc aupport package qualification. What do you think?

foxik commented 8 years ago

Currently I am inclining on revamping the hashmap (well, letting @winterland1989 do it as I do not have time nor motivation to do it myself).

@tibbe Do you have any thoughts on this? It seems people are using hashmap, so it would make sense to work directly on hashmap; but I am a bit worried about the same module names and possible confusions with unordered-containers (but as people are using hashmap, all the problems did not stop them using it).

winterland1989 commented 8 years ago

OK, I'll try create a new package and do more benchmark to see if it worth sharing.

One more question, why use Some not Map directly as leaf? Is there some speed advantage?

tibbe commented 8 years ago

If people want the different speed tradeoff of hashmap I don't mind if the names collide (it might actually be helpful so they can switch back and forth).

foxik commented 8 years ago

@winterland1989 Ok, so if you are willing to do it, please go ahead. However, I have some remarks:

winterland1989 commented 8 years ago

OK, thanks for your advice! I'll come back to you when it's ready.

sjakobi commented 4 years ago

Apologies if this is the wrong place to ask this question: What were the reasons behind the deprecation in favor of unordered-containers?

foxik commented 4 years ago

@sjakobi The unordered-containers seemed to be a more complete and more managed alternative, with quite similar performance characteristics (compared to other containers), so I decided to let it have the Data.Hash(Map|Set) name.