Quantcast
Channel: Planet Object Pascal
Viewing all articles
Browse latest Browse all 1725

DelphiTools.info: Optimistic Case-Insensitive String Hash

$
0
0
A trivial way to turn a case-sensitive String hash function into a case-insensitive one is to to pass a lower-case (or upper-case) version of the String. However, in our days of Unicode strings, this is not innocuous… Running a quick benchmark on SimpleStringHash (a FNV-1a derivative), I got the following figures (execution time, lower is better): SimpleStringHash(…

Viewing all articles
Browse latest Browse all 1725

Trending Articles