Re: RFR: 8282143: Objects.requireNonNull should be ForceInline [v2]

2022-03-01 Thread Paul Sandoz
On Wed, 2 Mar 2022 00:32:46 GMT, Quan Anh Mai wrote: >> Quan Anh Mai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> the other > > Thanks a lot for your reviews, do I need a second review for this? > @ExE-Boss IMO generally we only decor

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline [v2]

2022-03-01 Thread Quan Anh Mai
On Tue, 1 Mar 2022 02:22:49 GMT, Quan Anh Mai wrote: >> Hi, >> >> `Objects.requireNonNull` may fail to be inlined. The call is expensive and >> may lead to objects escaping to the heap while the null check is cheap and >> is often elided. I have observed this when using the vector API when a c

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline [v2]

2022-03-01 Thread Paul Sandoz
On Tue, 1 Mar 2022 02:22:49 GMT, Quan Anh Mai wrote: >> Hi, >> >> `Objects.requireNonNull` may fail to be inlined. The call is expensive and >> may lead to objects escaping to the heap while the null check is cheap and >> is often elided. I have observed this when using the vector API when a c

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline [v2]

2022-02-28 Thread ExE Boss
On Tue, 1 Mar 2022 02:22:49 GMT, Quan Anh Mai wrote: >> Hi, >> >> `Objects.requireNonNull` may fail to be inlined. The call is expensive and >> may lead to objects escaping to the heap while the null check is cheap and >> is often elided. I have observed this when using the vector API when a c

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline [v2]

2022-02-28 Thread Quan Anh Mai
On Tue, 1 Mar 2022 02:22:49 GMT, Quan Anh Mai wrote: >> Hi, >> >> `Objects.requireNonNull` may fail to be inlined. The call is expensive and >> may lead to objects escaping to the heap while the null check is cheap and >> is often elided. I have observed this when using the vector API when a c

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline [v2]

2022-02-28 Thread Quan Anh Mai
> Hi, > > `Objects.requireNonNull` may fail to be inlined. The call is expensive and > may lead to objects escaping to the heap while the null check is cheap and is > often elided. I have observed this when using the vector API when a call to > `Objects.requireNonNull` leads to vectors being ma

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline

2022-02-28 Thread Remi Forax
- Original Message - > From: "Paul Sandoz" > To: "core-libs-dev" > Sent: Tuesday, March 1, 2022 1:48:02 AM > Subject: Re: RFR: 8282143: Objects.requireNonNull should be ForceInline > On Sat, 19 Feb 2022 05:51:52 GMT, Quan Anh Mai wrote: > >

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline

2022-02-28 Thread Paul Sandoz
On Sat, 19 Feb 2022 05:51:52 GMT, Quan Anh Mai wrote: > Hi, > > `Objects.requireNonNull` may fail to be inlined. The call is expensive and > may lead to objects escaping to the heap while the null check is cheap and is > often elided. I have observed this when using the vector API when a call

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline

2022-02-28 Thread John R Rose
On Sat, 19 Feb 2022 05:51:52 GMT, Quan Anh Mai wrote: > Hi, > > `Objects.requireNonNull` may fail to be inlined. The call is expensive and > may lead to objects escaping to the heap while the null check is cheap and is > often elided. I have observed this when using the vector API when a call

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline

2022-02-23 Thread ExE Boss
On Sat, 19 Feb 2022 05:51:52 GMT, Quan Anh Mai wrote: > Should the other `requireNonNull` be `ForceInline` as well? Probably yes. - PR: https://git.openjdk.java.net/jdk/pull/7543