3 ms·
Some C++ implementations already implement symbol hashing. http://blogs.oracle.com/ali/entry/gnu_hash_elf_sections http://blogs.oracle.com/ali/entry/gnu_hash_el
by FooBarWidget 15y ago
Some C++ implementations already implement symbol hashing. http://blogs.oracle.com/ali/entry/gnu_hash_elf_sections http://blogs.oracle.com/ali/entry/gnu_hash_elf_sections
- zvrba 15y agoThis is an improvement of existing hashing scheme in ELF object files, and is completely different from what I proposed.
- FooBarWidget 15y agoI know, but it is hashing nonetheless. Doesn't it effectively achieve the same goal that you're after, namely faster symbol lookup?
- zvrba 15y agoIt is not as fast as it could be. It is an implementation of ordinary hash table, meaning that also a successful search requires comparing two strings several kB long. What I propose is to reduce ALL symbols to their hashes (SHA1 is 20 bytes) and to "dehash" them only after linking has been done. Collision in hashes is of only theoretical interest when you consider SHA1 or SHA256.