Skip to content

Show HN: Preprocessing Tool for Generating Hashes

github.com/riicchhaarrd
1 pointr1chardnldiscuss
On HN

I dabbled a bit with compile time hashing of strings and most ways seem to incur a heavy penalty on the compile time cost (in C++). Recently I came across https://handmade.network/forums/t/1507-compile_time_string_h... but having everything in one header file makes recompilation annoying. Thus I decided to make this small tool to just generate them inline. I'm sure there's some tool that does exactly this already out there, but, alas, I don't know.

It's still one of the things that bug me about C/C++, having to use RTTI vs compile time reflection/template/metaprogramming. Reflection for C++26 might help who knows.

Comments

No comments yet.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.