> I wonder how this caching works, given that the dynamic nature means
> that virtually every operation could have side effects, causing wrong
> behaviour when cached. The only mitigation for this that I can imagine
> is that caching just occurs for basic operations defined in the standard
> library, where it is known that they are free of side effects or "pure".
I've frequently explored the new adaptive, inline caching code generated by
3.11. "inline caching" does not mean result caching (like what C/C++ might do)
here, but rather it should mean the caching of info used for the adaptive
instructions. That means the bytecode stays the same except for the adaptive
instructions and the changed `CACHE`s below each adaptive instruction, which
should *always* be skipped due to the possibility of misinterpretation as other
instructions.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/2EYWR5OLDNCFRP5QEG7K5RV4XNPQX6WS/
Code of Conduct: http://python.org/psf/codeofconduct/