Stack allocation API

Remi Forax forax at univ-mlv.fr
Wed Feb 16 21:38:55 UTC 2022


----- Original Message -----
> From: "Ioannis Tsakpinis" <iotsakp at gmail.com>
> To: "Maurizio Cimadamore" <maurizio.cimadamore at oracle.com>
> Cc: "Felix Cravic" <themode at outlook.fr>, "panama-dev at openjdk.java.net'" <panama-dev at openjdk.java.net>
> Sent: Wednesday, February 16, 2022 9:56:43 PM
> Subject: Re: Stack allocation API


...

> An issue with LWJGL's approach is the thread-local access to grab the
> current thread's MemoryStack. The thread-local lookup itself is not
> terribly expensive (but not free either), however it does become a problem
> in hot code. Hotspot cannot hoist it out of loops and this has unfortunate
> consequences for the surrounding code. 

I wonder how the ScopeLocal of loom behave compared to ThreadLocal.
https://download.java.net/java/early_access/loom/docs/api/jdk.incubator.concurrent/jdk/incubator/concurrent/ScopeLocal.html

> 
> - Ioannis

Rémi


More information about the panama-dev mailing list