2011/5/24 Stefan Behnel <stefan_ml at behnel.de> > Maciej Fijalkowski, 24.05.2011 13:31: > > CPython was not designed for CPU cache usage as far as I'm aware. >> > > That's a pretty bold statement to make on this list. Even if it wasn't > originally "designed" for (efficient?) CPU cache usage, it's certainly been > around for long enough to have received numerous performance tweaks in that > regard. > > Stefan Maybe a change on memory allocation granularity can help here. Raising it to 16 and 32 bytes for 32 and 64 bits system respectively guarantees that an access to ob_refcnt and/or ob_type will put on the cache line some other information for the same object, which is usually required by itself (except for very simple ones, such as PyNone, PyEllipsis, etc.). Think about a long, a tuple, a list, a dictionary, ecc.: all of them have some critical data after these fields, that most likely will be accessed after INCRef or type checking. Regards, Cesare -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20110524/957fe2ee/attachment.html>
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