Yes, Doug posted some data a while back about sorting, where the breakeven between sorting references and taking the indirection hit and sorting values and taking the "more memory movement" hit was not obvious. Flattening means ... flattening.  Sometimes it means faster, but sometimes not.  This is yet another reason why we should focus on providing semantic knobs, not "performance-labeled" knobs.

On 5/9/2022 1:34 PM, Remi Forax wrote:
There is also something we should talk, using non-atomic value classes does not mean automatically better performance. It's something i've discovered trying to implement HashMap (more Map.of() in fact) using value classes. Updating a value class in the heap requires more writes, more memory traffic than just updating pointers so depending on the algorithm, you may see performance degradation compared to a pointer based implementation.

So even if we provide non-atomic B3, performance can be worst than using atomic B3, sadly gaining more flatness does not necessarily translate into better performance.

Reply via email to