Review request for JDK-8035712

Attila Szegedi attila.szegedi at
Thu Mar 5 10:56:30 UTC 2015

Thanks folks. In the meantime (as part of inspecting that regression that Benjamin Winterberg pointed out)I realized that there often seems to be a significant performance difference between loading an operand as Object and converting to double, and loading it as double (when we're allowed to reorder converts and loads). That is, an "i < size" (where size is in scope and i is double) can be emitted as:

  dload 5 // i
  aload 2 // scope
  invokedynamic dyn:getProp|getElem|getMethod:size(Object;)D // size

instead of 

  dload 5
  aload 2
  invokedynamic dyn:getProp|getElem|getMethod:size(Object;)Object
  invokestatic JSType.toNumber(Object)

The first one is actually faster, especially when size is already a number due to dual fields (it was just unprovable statically). For this, I uploaded a small differential patch between what you already reviewed and the new modification. Please review this as well <>


On Mar 4, 2015, at 5:17 PM, Marcus Lagergren <marcus.lagergren at> wrote:

> +1 if you have done the octane regression analysis.
>> On 04 Mar 2015, at 11:34, Attila Szegedi <attila.szegedi at> wrote:
>> Please review JDK-8035712 at <> for <>
>> The JIRA issue has notes on the implementation: <>
>> Thanks,
>> Attila.

More information about the nashorn-dev mailing list