Steve Jorgensen <nospam at nospam.nospam> writes: > Given that Python is highly dependent upon dictionaries, I would > think a lot of the processor time used by a Python app is spent in > updating hash tables. That guess could be right or wrong, bus > assuming it's right, is that a design flaw? That's just a language > spending most of its time handling the constructs it is based on. > What else would it do? I don't believe it's right based on half-remembered profiling discussions I've seen here. I haven't profiled CPython myself. However, if tuning the rest of the implementation makes hash tables a big cost, then the implementation, and possibly the language, should be updated to not have to update hashes so much. For example, x.y = 3 currently causes a hash update in x's internal dictionary. But either some static type inference or a specializing compiler like psyco could optimize the hash lookup away, and just update a fixed slot in a table.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4