[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: Patch: bdb_db_hash() problems (ITS#1726)
Howard Chu writes:
> Interesting. You actually have a machine with 9-bit bytes or 36-bit ints?
No. I just noticed when I looked at it, and since I needed an if()
anyway...
> Much of your if condition should be resolved at compile time by the
> preprocessor, not at runtime.
Any decent compiler will resolve if(foo && CONSTANT) to if(foo) or
if(false) -> nothing at compile time. No need for preprocessor tricks.
> It may be simpler just to do the single-byte copies and eliminate the
> conditions altogether. For 4 bytes, it's probably cheaper than
> invoking memcpy anyway.
Unless memcpy is builtin.
--
Hallvard