Closed mcpower closed 2 years ago
I can't reproduce 'constructor is 85% slower than fromDecimal', they're equal within margin of error for me. And constructor is less than 10% slower than fromNumber.
But logically it makes absolute sense that it's quicker to say 'hey this is an X' than to make the constructor do checks and call an extra function, so I'll probably merge this anyway after checking it over.
I can't reproduce 'constructor is 85% slower than fromDecimal', they're equal within margin of error for me
The difference is there for me, but it's only a few percent.
Hm, I can't reproduce it either - maybe there's been some V8 optimisations since I wrote my PR.
For some reason the constructor is noticeably slower than fromX: