es5-ext icon indicating copy to clipboard operation
es5-ext copied to clipboard

Try to optimise toPosInt

Open medikoo opened this issue 11 years ago • 1 comments

According to https://github.com/medikoo/es6-iterator/pull/2 it may slow down hot paths.

There's either issue in unconditional max call or internals of toInteger.

As a side note toPosInt will be renamed to toNatural

medikoo avatar Nov 19 '14 14:11 medikoo

As far as I played with it - it's rather problem with toInteger in general (I tried replacing max with custom ternary operator, but speed difference was negligible.

RReverser avatar Nov 19 '14 14:11 RReverser