Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
On the other hand, the code you are actually timing is a hell of a lot more than just that one call to print. Inside the timing code you have:
I chose xxHash as the "faster" hash function to test out since it is a single header file and is easy to compile.
https://github.com/python/cpython/blame/master/Python/pyhash.c#L152
Google spent literal money paying Matt Kulukundis to improve hash table performance. Now it's literally the built-in hash table for Rust.
MeowHash is the fastest non-cryptographic hash available online, and if it were used in CPython, which performs a hash for every fundamental operation in the language, then Python would be much faster.
Related posts
- Meow Hash
- The One Billion Row Challenge in CUDA: from 17 minutes to 17 seconds
- ETag and HTTP Caching
- Proof_Math_Is_Engineered: never-seen-before mind-blowing imagery discovered, with "original sin" consonants (for a layman)
- What Are Your Thoughts on This Claim To Have Discovered Mathematical Evidence for God?