[PATCH] InstrProf: Calculate a better function hash

Duncan P. N. Exon Smith dexonsmith at apple.com
Tue Mar 25 11:02:52 PDT 2014


On Mar 25, 2014, at 10:20 AM, Raul Silvera <rsilvera at google.com> wrote:

> How about an FNV hash? That is very simple to implement, fast, and will be stronger at detecting changes.

FNV looks great; thanks!  I’ll resubmit with FNV-1a [1].

http://isthe.com/chongo/tech/comp/fnv/#FNV-1a

> Should the hashing computation be split from PGO into its own utility? Having a general hashing for functions may have other uses; in particular MergeFunc comes to mind.

Good idea.



More information about the cfe-commits mailing list