TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Preprocessing Tool for Generating Hashes

1 pointsby r1chardnl9 months ago
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 <a href="https:&#x2F;&#x2F;handmade.network&#x2F;forums&#x2F;t&#x2F;1507-compile_time_string_hashing_with_c_constexpr_vs._your_own_preprocessor" rel="nofollow">https:&#x2F;&#x2F;handmade.network&#x2F;forums&#x2F;t&#x2F;1507-compile_time_string_h...</a> but having everything in one header file makes recompilation annoying. Thus I decided to make this small tool to just generate them inline. I&#x27;m sure there&#x27;s some tool that does exactly this already out there, but, alas, I don&#x27;t know.<p>It&#x27;s still one of the things that bug me about C&#x2F;C++, having to use RTTI vs compile time reflection&#x2F;template&#x2F;metaprogramming. Reflection for C++26 might help who knows.

no comments

no comments