Use of long in Nashorn
marcus at lagergren.net
Tue Dec 15 08:55:15 UTC 2015
All octane benchmarks and stuff like that run with no serious regressions, I hope?
> On 14 Dec 2015, at 17:30, Hannes Wallnoefer <hannes.wallnoefer at oracle.com> wrote:
> For the record, I tried the integer index optimization for array iterators, but didn't really see a difference running a microbenchmark using Array.prototype.forEach, so I left it out after all.
> Am 2015-12-11 um 16:30 schrieb Hannes Wallnoefer:
>> Am 2015-12-11 um 16:21 schrieb Attila Szegedi:
>>> On Dec 11, 2015, at 4:08 PM, Hannes Wallnoefer <hannes.wallnoefer at oracle.com> wrote:
>>>> I didn't implement the int/double overloading of array iterator actions. Unless I missed something, I would have to implement two forEach methods in each subclass, which seem ugly and error prone.
>>> You haven’t missed anything; that’s exactly how that would work. Ultimately, if we had macros in Java, this wouldn’t need to look ugly, but we don’t have them, so… Performance optimizations are sometimes ugly :-) Anyway, this needn’t happen now, although ultimately I don’t think it’d be much of a big deal to implement, even with the unfortunate code duplication, and we still wouldn’t always force-promote the parameter type for the callback functions to double.
>> Ok, you convinced me. I'll add that optimization an upcoming webrev. Still waiting for other reviews though.
More information about the nashorn-dev