Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v6]

2022-10-26 Thread Сергей Цыпанов
> Currently some operations of RandomAccessFile are implemented with multiple > read() invocations: > > public final int readInt() throws IOException { > int ch1 = this.read(); > int ch2 = this.read(); > int ch3 = this.read(); > int ch4 = this.read(); > if ((ch1 | ch2 | ch3 |

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v5]

2022-09-27 Thread Сергей Цыпанов
On Fri, 26 Aug 2022 20:59:57 GMT, Сергей Цыпанов wrote: >> Currently some operations of RandomAccessFile are implemented with multiple >> read() invocations: >> >> public final int readInt() throws IOException { >> int ch1 = this.read(); >> int ch2 = this.read(); >> int ch3 = this.r

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v5]

2022-08-29 Thread Сергей Цыпанов
On Sat, 27 Aug 2022 06:52:19 GMT, Alan Bateman wrote: >> Сергей Цыпанов has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - 8292937: Fix error C2057 >> - 8292937: Remove unused method > > src/java.base/share/native/libjava/io_util.c line

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v5]

2022-08-26 Thread Alan Bateman
On Fri, 26 Aug 2022 20:59:57 GMT, Сергей Цыпанов wrote: >> Currently some operations of RandomAccessFile are implemented with multiple >> read() invocations: >> >> public final int readInt() throws IOException { >> int ch1 = this.read(); >> int ch2 = this.read(); >> int ch3 = this.r

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v5]

2022-08-26 Thread Сергей Цыпанов
> Currently some operations of RandomAccessFile are implemented with multiple > read() invocations: > > public final int readInt() throws IOException { > int ch1 = this.read(); > int ch2 = this.read(); > int ch3 = this.read(); > int ch4 = this.read(); > if ((ch1 | ch2 | ch3 |

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v2]

2022-08-26 Thread Roger Riggs
On Fri, 26 Aug 2022 17:02:36 GMT, Сергей Цыпанов wrote: >> src/java.base/share/native/libjava/io_util.c line 82: >> >>> 80:((*(buf + 1) & 0xFF) << 16) + >>> 81:((*(buf + 2) & 0xFF) << 8) + >>> 82:((*(buf + 3) & 0xFF)); >> >> What if the native byt

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v4]

2022-08-26 Thread Сергей Цыпанов
> Currently some operations of RandomAccessFile are implemented with multiple > read() invocations: > > public final int readInt() throws IOException { > int ch1 = this.read(); > int ch2 = this.read(); > int ch3 = this.read(); > int ch4 = this.read(); > if ((ch1 | ch2 | ch3 |

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v2]

2022-08-26 Thread Сергей Цыпанов
On Fri, 26 Aug 2022 16:39:01 GMT, Brian Burkhalter wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8292937: Move logic into VM side > > src/java.base/share/native/libjava/io_util.c line 82: > >> 80:

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v3]

2022-08-26 Thread Сергей Цыпанов
> Currently some operations of RandomAccessFile are implemented with multiple > read() invocations: > > public final int readInt() throws IOException { > int ch1 = this.read(); > int ch2 = this.read(); > int ch3 = this.read(); > int ch4 = this.read(); > if ((ch1 | ch2 | ch3 |

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v2]

2022-08-26 Thread Brian Burkhalter
On Fri, 26 Aug 2022 12:10:58 GMT, Сергей Цыпанов wrote: >> Currently some operations of RandomAccessFile are implemented with multiple >> read() invocations: >> >> public final int readInt() throws IOException { >> int ch1 = this.read(); >> int ch2 = this.read(); >> int ch3 = this.r

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v2]

2022-08-26 Thread Сергей Цыпанов
On Fri, 26 Aug 2022 12:56:50 GMT, Alan Bateman wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8292937: Move logic into VM side > > src/java.base/share/native/libjava/io_util.c line 71: > >> 69: jint nread =

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v2]

2022-08-26 Thread Alan Bateman
On Fri, 26 Aug 2022 12:10:58 GMT, Сергей Цыпанов wrote: >> Currently some operations of RandomAccessFile are implemented with multiple >> read() invocations: >> >> public final int readInt() throws IOException { >> int ch1 = this.read(); >> int ch2 = this.read(); >> int ch3 = this.r

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile

2022-08-26 Thread Сергей Цыпанов
On Fri, 26 Aug 2022 01:49:06 GMT, Quan Anh Mai wrote: >>> Maybe you can modify the read0 method to receive a width parameter >>> additionally. >> >> @merykitty sorry, I don't get it. We already have `readBytes0()` returning >> array. Why do we need to add a new param to `read0`? > > @stsypanov

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile [v2]

2022-08-26 Thread Сергей Цыпанов
> Currently some operations of RandomAccessFile are implemented with multiple > read() invocations: > > public final int readInt() throws IOException { > int ch1 = this.read(); > int ch2 = this.read(); > int ch3 = this.read(); > int ch4 = this.read(); > if ((ch1 | ch2 | ch3 |

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile

2022-08-25 Thread Сергей Цыпанов
On Thu, 25 Aug 2022 17:14:20 GMT, Сергей Цыпанов wrote: > Currently some operations of RandomAccessFile are implemented with multiple > read() invocations: > > public final int readInt() throws IOException { > int ch1 = this.read(); > int ch2 = this.read(); > int ch3 = this.read();

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile

2022-08-25 Thread Quan Anh Mai
On Thu, 25 Aug 2022 19:10:19 GMT, Сергей Цыпанов wrote: >> Maybe you can modify the `read0` method to receive a width parameter >> additionally. Or we can wait for Panama and use `mmap` for this instead of >> JNI? Thanks. > >> Maybe you can modify the read0 method to receive a width parameter

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile

2022-08-25 Thread Сергей Цыпанов
On Thu, 25 Aug 2022 17:58:05 GMT, Quan Anh Mai wrote: > Maybe you can modify the read0 method to receive a width parameter > additionally. @merykitty sorry, I don't get it. We already have `readBytes0()` returning array. Why do we need to add a new param to `read0`? - PR: https:/

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile

2022-08-25 Thread Сергей Цыпанов
On Thu, 25 Aug 2022 17:31:05 GMT, Brian Burkhalter wrote: >> Currently some operations of RandomAccessFile are implemented with multiple >> read() invocations: >> >> public final int readInt() throws IOException { >> int ch1 = this.read(); >> int ch2 = this.read(); >> int ch3 = this

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile

2022-08-25 Thread Quan Anh Mai
On Thu, 25 Aug 2022 17:14:20 GMT, Сергей Цыпанов wrote: > Currently some operations of RandomAccessFile are implemented with multiple > read() invocations: > > public final int readInt() throws IOException { > int ch1 = this.read(); > int ch2 = this.read(); > int ch3 = this.read();

Re: RFR: 8292937: Improve performance of some read operations of RandomAccessFile

2022-08-25 Thread Brian Burkhalter
On Thu, 25 Aug 2022 17:14:20 GMT, Сергей Цыпанов wrote: > Currently some operations of RandomAccessFile are implemented with multiple > read() invocations: > > public final int readInt() throws IOException { > int ch1 = this.read(); > int ch2 = this.read(); > int ch3 = this.read();

RFR: 8292937: Improve performance of some read operations of RandomAccessFile

2022-08-25 Thread Сергей Цыпанов
Currently some operations of RandomAccessFile are implemented with multiple read() invocations: public final int readInt() throws IOException { int ch1 = this.read(); int ch2 = this.read(); int ch3 = this.read(); int ch4 = this.read(); if ((ch1 | ch2 | ch3 | ch4) < 0) th