Most applications, especially databases, can sort and filter by small integers or floats much faster than they can do string comparisons.
Therefore I'm wondering if there is a hashing function that I can use to return a 32bit or 64bit number of a short string (about 5 - 40 characters) so that I can compare by integer instead of by string.
I first thought of crc32, but it seems it's much too small of a number and would result in possible collisions in less than 50,000 hashes (I need to do over a million).
I'm mostly interested in working in Python, PHP, V8 Javascript, PostgreSQL, and MySQL.