Re: RFR: 6506405: Math.abs(float) is slow [v9]

2021-08-15 Thread Tagir F . Valeev
On Mon, 12 Jul 2021 17:59:32 GMT, Brian Burkhalter wrote: >> Please consider this change to make the `float` and `double` versions of >> `java.lang.Math.abs()` branch-free. > > Brian Burkhalter has refreshed the contents of this pull request, and > previous commits have been removed. The

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-15 Thread Alan Snyder
Ah, if only one could define a type alias Streamable = Supplier>... > On Aug 15, 2021, at 8:42 PM, Tagir F.Valeev wrote: > > On Mon, 9 Aug 2021 12:28:23 GMT, CC007 > wrote: > >> create Streamable and ParallelStreamable interface and use them in >> Collection and Optional > > Mostly agreed

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-15 Thread Tagir F . Valeev
On Mon, 9 Aug 2021 12:28:23 GMT, CC007 wrote: > create Streamable and ParallelStreamable interface and use them in Collection > and Optional Mostly agreed with Brian. Judging from 7 years of using Stream API, I can say that this abstraction would not solve any real problem. If you need a way

Re: RFR: 8272297: FileInputStream should override transferTo() for better performance [v2]

2021-08-15 Thread Roman Kennke
On Fri, 13 Aug 2021 14:41:54 GMT, Alan Bateman wrote: > > Is this what you have been asking @mkarg in #4263 to do? Optimize > > transferTo() only for FileInputStream? Would it interfere with #4263? > > #4263 is the input stream returned by Channels.newInputStream where the > source may be a

Re: RFR: 8272297: FileInputStream should override transferTo() for better performance [v4]

2021-08-15 Thread Alan Bateman
On Fri, 13 Aug 2021 19:20:48 GMT, Brian Burkhalter wrote: >> Please consider this request to add an override >> `java.io.FileInputStream.transferTo(OutputStream)` with improved performance >> if the parameter is a `FileOutputStream`. > > Brian Burkhalter has updated the pull request

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-15 Thread Alan Bateman
On 15/08/2021 14:29, Brian Goetz wrote: For the third time: This discussion illustrates why the PR was premature; the design was not agreed upon first.  High-level design discussions (i.e., "is this a good design", "is this a good idea at all", "are we solving the right problem", "does it need

Re: RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v13]

2021-08-15 Thread Markus KARG
On Fri, 13 Aug 2021 12:54:55 GMT, Alan Bateman wrote: > > Does it make **any** real sense to answer your recent questions, provide > > the proofs, tests and benchmark results (I actually would love to _if_ it > > makes sense) _or_ will the outcome be that I _must_ drop everything besides > >

Re: RFR: 8272137: Make Collection and Optional classes streamable

2021-08-15 Thread Brian Goetz
For the third time: This discussion illustrates why the PR was premature; the design was not agreed upon first.  High-level design discussions (i.e., "is this a good design", "is this a good idea at all", "are we solving the right problem", "does it need to be solved in the JDK") should happen

'Condition is always false' in 'BigInteger#multiply(BigInteger, boolean)'

2021-08-15 Thread Andrey Turbanov
Hello. I found suspicious condition in method "java.math.BigInteger#multiply(java.math.BigInteger, boolean)" It's detected by IntelliJ IDEA inspection 'Constant conditions & exceptions' ``` if (bitLength(mag, mag.length) + bitLength(val.mag, val.mag.length) > 32L*MAX_MAG_LENGTH) {