Python str id hash
I'm trying to convert user access log into a pure binary format, which
would require me to convert string into int using some hash method, and
then the mapping relationship of "id -> string value" would be stored
somewhere for further backward retrieve.
Since I'm using Python, in order to save some process time, instead of
using hashlib, can I simply use
string_hash = id(intern(some_string))
as the hash method? Any basic different to be aware of comparing to MD5?
No comments:
Post a Comment