inexorabletash / text-encoding

Polyfill for the Encoding Living Standard's API
Other
720 stars 267 forks source link

Performance improvements #47

Closed eugenpodaru closed 8 years ago

eugenpodaru commented 8 years ago

For large strings/byte arrays the library becomes unusable. I've made some small changes that improve the performance by 100% to 200%:

The biggest performance improvement comes from changing the Stream implementation.

inexorabletash commented 8 years ago

I'd prefer to keep inRange out of line. Otherwise the changes look good.

eugenpodaru commented 8 years ago

@inexorabletash Ok, fair enough.

Should I put inRange back out of line?

inexorabletash commented 8 years ago

That would make the merge easier!

On Dec 28, 2015, at 7:48 AM, Eugen Podaru notifications@github.com wrote:

@inexorabletash Ok, fair enough.

Should I put inRange back out of line?

— Reply to this email directly or view it on GitHub.

eugenpodaru commented 8 years ago

Ok, done. I've reverted to the commit with out of line inRange.

inexorabletash commented 8 years ago

Thanks!

eugenpodaru commented 8 years ago

Great! When is the next release?

inexorabletash commented 8 years ago

I pushed some refactoring changes up; can you sanity check that I didn't regress your performance? If that looks good I'll tag a release.

eugenpodaru commented 8 years ago

It seems to be alright