News for hackers. Stuff that matters.
Re:How Many Lines of C It Takes to Execute a and B in Python? by ynik on Monday December 11, 2023 @05:33AM (#38599307)
AFAIK Python strings cache their hash value. All the hash table lookups for object properties should be compile-time constant strings that reuse the string object, and thus also reuse the cached hash value. It may take 11 hash computations for the first print("hello world"), but the second call shouldn't take any.

There are no comments on this comment yet.