[Python-Dev] Re: Annotating pure functions to improve inline caching/optimization

2022-09-14 Thread Jeremiah Gabriel Pascual
> 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 >

[Python-Dev] Re: Annotating pure functions to improve inline caching/optimization

2022-09-14 Thread Eric V. Smith via Python-Dev
You should bring this up on discuss.python.org. It's not going to see much if any discussion here. Eric On 9/14/2022 10:05 AM, Philipp Burch wrote: Hello everyone, the docs on the upcoming 3.11 release state > This [specializing adaptive interpreter] also brings in another concept called

[Python-Dev] Annotating pure functions to improve inline caching/optimization

2022-09-14 Thread Philipp Burch
Hello everyone, the docs on the upcoming 3.11 release state > This [specializing adaptive interpreter] also brings in another concept called inline caching, where Python caches the results of expensive operations directly in the bytecode. I wonder how this caching works, given that the