[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Possible enhancements for Lua 5.2
- From: Gaspard Bucher <gaspard@...>
- Date: Mon, 27 Jun 2011 15:00:05 +0200
On Mon, Jun 27, 2011 at 2:13 PM, Patrick Rapin <firstname.lastname@example.org>
Thank you for that link. I have also several time tried to implement
> Some time ago, I had a similar need and have used pseudo-recursive C macros
> to compute the hash value at compile time: https://gist.github.com/1048415
such a compile-time hash in C, but without success (neither with
macros, enums, nor templates).
The code of Chris Savoie seems to work however (with optimizations turned on).
Out of curiosity, did you implement the Lua hashing function or something specific to your code (meaning you hash the C string during runtime) ?