indy-based string-switch proposal

Remi Forax forax at univ-mlv.fr
Tue Nov 5 18:40:29 UTC 2019


----- Mail original -----
> De: "John Rose" <john.r.rose at oracle.com>
> À: "Brian Goetz" <brian.goetz at oracle.com>
> Cc: "amber-dev" <amber-dev at openjdk.java.net>
> Envoyé: Mardi 5 Novembre 2019 19:32:58
> Objet: Re: indy-based string-switch proposal

> On Nov 5, 2019, at 1:06 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
>> 
>> Note that we want to use this technique for all switches except those over int
>> and smaller.
> 
> There are cases where smaller types should be handed to the library also.
> I know this would be profitable for character classification switches (usable
> by parsers!), which is why I called out that case at the end of my long message.
> LLVM is having some fun with those; we should too.

I wonder if it's not better for this specific case to has a specific optimization of the tableswitch inside the JIT so some existing tableswitch will be optimized has well without recompiling.

Rémi


More information about the amber-dev mailing list