Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> https://youtu.be/ncHmEUmJZf4?t=2220

Some good points, but also "calling find with C strings is slow", you are using C strings, don't expect speed from code worshiping strlen of all things. Also the issue with integer hash being its identity? That is the case for every language I checked (Python, Java, C#).



I mean, if Python, Java or C# were good enough for me as a C++ user, I'd use them.

The mindset behind C++ is not a relative "thing must be good enough", but an absolute "there must not be something better possible".

Of course, this is often not realized in practice, but it's the goal.


> "there must not be something better possible"

It maps all integer values to distinct hashes which seems rather ideal, what it doesn't give you is perfect performance in an artificial benchmark written to exploit this implementation.


Tangent, but I remember reading not too long ago that there were some cases where perfect hashes weren't optimal, but can't remember where..




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: