3 ms·
I did this for an object pool in re2j and saw even single threaded performance improve. https://github.com/google/re2j/blob/dc7d6e5d41225dc0825ea6fe4c6055ff854
by charleslmunger 4y ago
I did this for an object pool in re2j and saw even single threaded performance improve.
https://github.com/google/re2j/blob/dc7d6e5d41225dc0825ea6fe4c6055ff854abe13/java/com/google/re2j/RE2.java#L233 https://github.com/google/re2j/blob/dc7d6e5d41225dc0825ea6fe...
Java doesn't suffer from pointer address ABA but I did have to handle reinsertion (except when the stack had only one element).