News for hackers. Stuff that matters.
Re:Transmission torrent client ported to C++ by josefx on Monday September 13, 2021 @01:56AM (#28508239)
> 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#).

Re:Transmission torrent client ported to C++ by jcelerier on Monday September 13, 2021 @04:00AM (#28508927)
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.

Re:Transmission torrent client ported to C++ by josefx on Monday September 13, 2021 @05:01AM (#28509204)
> "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.

Re:Transmission torrent client ported to C++ by jcelerier on Monday September 13, 2021 @05:33AM (#28509361)
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..