Just double-checked. At least as of SL, CFNumber uses an int as its own hash. Very bad hash distribution on many common kinds of data sets.
@grynspan Where do you see that? In the 10.6.8 CF source, I see _CFHashInt() multiplying the int by HASHFACTOR.
-
-
@mjtsai Yes, but the result is still poor distribution. Also negative numbers are given the same hash as their negation. -
@grynspan I’m not saying it’s a good distribution, just that hash(i) != i. - View other replies
-
-
@mjtsai Apple didn't invent 2654435761 of course, but there are better ways to stir data. -
@mjtsai (My original tweet skipped HASHFACTOR for space.)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Jonathan Grynspan
Michael Tsai