hg: amber/amber: dont intrinsify Objects::hash

Tagir Valeev amaembo at gmail.com
Thu Apr 4 13:05:01 UTC 2019


Hello!

>
> Quite simple: the intensification failed to achieve sufficient performance improvement to justify the intensification (and sometimes even caused regressions.).
>
> Intensification is a big, big hammer; it should be reserved for when it yields big, big results.  For String::format, it yields results in the 20-60x (that’s x, not %) performance improvement — that clears the bar.  Maybe getting 2x, maybe not, does not clear the bar.

Totally agree. In this case it looks like the JIT/AOT compiler may
achieve the same result as intrinsification and such JIT improvements
could automatically improve many more vararg methods. The
iterate-over-vararg pattern is quite popular in third-party code as
well, so unrolling the loop over array used only in this loop and
eliminating array allocation with a further possibility to eliminate
boxing sounds like a nice JIT/AOT optimization. Probably Graal already
does this. No need to invest efforts to intrinsify it on javac level.

With best regards,
Tagir Valeev.

>
> > On Apr 4, 2019, at 7:39 AM, Remi Forax <forax at univ-mlv.fr> wrote:
> >
> > Hi Vicente,
> > what is the reason to not intrinsify Objects::hash ?
> >
> > Rémi
> >
> > ----- Mail original -----
> >> De: "Vicente Romero" <vicente.romero at oracle.com>
> >> À: "amber-dev" <amber-dev at openjdk.java.net>
> >> Envoyé: Mardi 2 Avril 2019 23:40:53
> >> Objet: hg: amber/amber: dont intrinsify Objects::hash
> >
> >> Changeset: 99ed2dfcc0fa
> >> Author:    vromero
> >> Date:      2019-04-02 17:39 -0400
> >> URL:       http://hg.openjdk.java.net/amber/amber/rev/99ed2dfcc0fa
> >>
> >> dont intrinsify Objects::hash
> >>
> >> ! src/java.base/share/classes/java/lang/invoke/IntrinsicFactory.java
> >> - src/java.base/share/classes/java/lang/invoke/ObjectsBootstraps.java
> >> ! src/java.base/share/classes/java/util/Objects.java
> >> -
> >> src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/HashProcessor.java
> >> ! src/jdk.compiler/share/classes/module-info.java
> >> - test/langtools/tools/javac/intrinsics/CheckIndyGeneratedTest2.java
>


More information about the amber-dev mailing list