3 ms·
The OP "Performance comparison: counting words in Python, Go, C++, C, Awk, Forth, Rust" does not allow external libraries BUT then makes an exception for C, and
by igouy 6y ago
The OP "Performance comparison: counting words in Python, Go, C++, C, Awk, Forth, Rust" does not allow external libraries BUT then makes an exception for C, and then makes a further exception -- In the optimized version we’ll roll our own hash table.
Wikipedia is your friend -- "A hash table uses a hash function to compute an index, also called a hash code …"
Which languages shown on the benchmarks game website 'don't allow to specify custom hash functions …" ?
https://en.wikipedia.org/wiki/Hash_function https://en.wikipedia.org/wiki/Hash_function
- _ph_ 6y agoI was not talking about the article but the benchmark site linked. Not sure what you want to say with the wikipedia citation. I have not made a comprehensive list, but the topic has come up when discussing one of the Go benchmarks. The Go language has a build-in hashtable, called a map, and this does not allow to specify custom hash functions. Of course rolling out a hashtable implementation which does allow this is prohibited by the benchmark rules. Probably intentionally, also like your distraction attempts are hinting to.
- igouy 6y agoSo you say "Many languages don't allow to specify custom hash functions" but can only name one? > Probably intentionally Wow.