Heroic +1 from me too. Spent 3 hours going over this yesterday night and looking at your tests.
/M > On 09 Nov 2015, at 12:35, Hannes Wallnoefer <hannes.wallnoe...@oracle.com> > wrote: > > Am 2015-11-09 um 12:09 schrieb Attila Szegedi: >> +1. Reviewed the original over the weekend; quite a heroic effort in porting >> and adjusting this to Nashorn. Big kudos for having the perseverance to get >> this done! > > Thanks. It wasn't quite as bad as it looks. The worst actually was to port > some of the tests using java.lang.reflect. > > Hannes > >> Attila. >> >>> On Nov 9, 2015, at 11:17 AM, Hannes Wallnoefer >>> <hannes.wallnoe...@oracle.com> wrote: >>> >>> I uploaded a new webrev with fixed copyright headers (added Oracle GPL >>> headers). Otherwise it is pretty much the same as the first one except for >>> minor changes in comments/formatting. >>> >>> http://cr.openjdk.java.net/~hannesw/8010803/webrev.01/ >>> >>> Hannes >>> >>> >>> Am 2015-11-06 um 13:59 schrieb Hannes Wallnoefer: >>>> Please review JDK-8010803: Number to String conversion functionality >>>> overhaul: >>>> >>>> http://cr.openjdk.java.net/~hannesw/8010803/ >>>> >>>> This is a mostly complete port of the V8 double conversion code[1] to >>>> Java. It includes Bignum-based algorithms for converting doubles to >>>> shortest, precision, and fixed decimals representation, as well as >>>> specialized faster algorithms for each of the conversion modes. >>>> >>>> The only thing I left out is string to number conversion and support for >>>> single precision floats, both of which is not needed for Nashorn. I also >>>> ported all the relevant tests, which includes 100,000 random numbers for >>>> each of the (shortest|precision|fixed) conversion modes as well as well as >>>> unit tests for various implementation classes. >>>> >>>> With this new dtoa conversion we are fully compatible with all other JS >>>> implementations. The fast algorithms are also about 5x faster than what we >>>> had before. The fallback Bignum implementation still roughly provides a 2x >>>> speedup. >>>> >>>> [1]: https://github.com/google/double-conversion >>>> >>>> Thanks, >>>> Hannes >