RFR 8005311: Add Scalable Updatable Variables, DoubleAccumulator, DoubleAdder, LongAccumulator, LongAdder (original) (raw)

Martin Buchholz martinrb at google.com
Sun Jan 6 20:25:15 UTC 2013


On Sat, Jan 5, 2013 at 3:42 PM, Remi Forax <forax at univ-mlv.fr> wrote:

The code is not very java-ish,

Yes, j.u.c.-java is hard to read due to extreme performance orientation and need to save reads in locals everywhere, and pretty far from java programmer mainstream.

I'm also looking at LongAccumulator.accumulate(long).

Striped64: void accumulateLong(long x, LongBinaryOperator fn) LongAccumulator: void accumulate(long x) { return accumulateLong(x, function); }


I still like this style for pulling final fields into locals (but others don't seem to share my taste): final Cell[] cells = this.cells; final LongBinaryOperator function = this.function;



More information about the core-libs-dev mailing list