Re: a quick question about String

2021-12-23 Thread Simon Roberts
at their documentation > says (allocate a new instance), or is there some kind of compiler magic > that might avoid allocation? > > -- Simon Roberts (303) 249 3613

Re: Adding an @Immutable annotation to Java

2021-11-29 Thread Simon Roberts
t all existing immutable objects (like the > primitive-wrapping objects and String) should be annotated with @Immutable > and the programmer could, for example, annotate a new record object with > @Immutable only if all its fields are annotated with @Immutable. > > > > What do you think? > > > > Regards, > > > > Alberto Otero Rodríguez. > -- Simon Roberts (303) 249 3613

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger

2021-11-16 Thread Simon Roberts
decide that when the multiply() is called and then do the > calculation sequentially. > > We probably also need to be able to turn it off entirely. Perhaps with > something like -Djava.math.BigInteger.disableParallelMultiply=true. > > Heinz > > - > > PR: https://git.openjdk.java.net/jdk/pull/6409 > -- Simon Roberts (303) 249 3613

Re: RFR: 8193031: Collections.addAll is likely to perform worse than Collection.addAll

2020-12-17 Thread Simon Roberts
addAll:·gc.alloc.rate.normConcurrentLinkedDeque > 10 312.0 ± 0.0B/op > >> addAll:·gc.alloc.rate.normConcurrentLinkedDeque > 100 2472.1 ± 0.0B/op > >> addAll:·gc.alloc.rate.normConcurrentLinkedDeque >

Re: RFR: 8180352: Add Stream.toList() method

2020-11-05 Thread Simon Roberts
s calls don't > >> 199: * accidentally create an array of type other than Object[]. > > > > Why would that be a problem? If the resulting list is immutable, then > the actual array type doesn't really matter, right? > > It's an implementation invariant that

Re: [Lambda]parallel sort stream slow than series sort

2020-09-28 Thread Simon Roberts
; endTime = System.currentTimeMillis();System.out.println("parallel sorted > execute time:" + (endTime - startTime) + "ms, resultset rows " + list.size() > + ", " + (long) list.size() * 1000 / (endTime - startTime) + " > rows/sec"); > >

Re: [Lambda]parallel sort stream slow than series sort

2020-09-25 Thread Simon Roberts
le testdata( > idint, > uptimetimestamp, > xint, > yint, > cmttext > ); > insert into testdata > select > id, > uptime, > round(random()*100), > round(random()*100), > md5(uptime::text) >