Subject: Re: New hash algorithm - FNV - for use in the kernel
To: None <firstname.lastname@example.org>
From: Lennart Augustsson <email@example.com>
Date: 11/28/2001 01:12:43
Thor Lancelot Simon wrote:
> ...but it turned out that GCC is smart enough to do the obvious
> optimization with the shift. If it can do % constant I'd be quite
> surprised if it can't do * constant, but it's not exactly tough to
> compile a quick example to assembly and check.
Yes, GCC turn division (and modulo) into multiplication for certain
architectures (alpha comes to mind). It's surprisingly tricky. There
was a PLDI paper about it in -95.