peterolson / BigInteger.js

An arbitrary length integer library for Javascript
The Unlicense
1.12k stars 187 forks source link

Plans for the tc39 bigint proposal? #136

Closed xuset closed 5 years ago

xuset commented 6 years ago

Awesome project! I just found out that a new standard is being pushed forward for arbitrary sized integers and seems to have some partial support in chrome, firefox, and safari. I'm curious what this means for this project since it seems that this project could benefit greatly from the performance improvements.

Happy coding!

peterolson commented 6 years ago

Yes, good point.

My plan would be to make BigInteger.js work sort of as a polyfill: check if the environment supports native bigints, if so, the library will be a thin wrapper over the native implementation. Otherwise, fall back to the library's current implementation.

username1565 commented 6 years ago

Just leave here USER-SCRIPTS for all this browsers. And JavaScript is programming language for userscripts.

fieryo commented 5 years ago

Chrome 67 already supports BigInt and there is a new JSBI polyfill for other browsers. I'm sure that BigInteger.js will get real boost from the native Chrome's implementation.

peterolson commented 5 years ago

Resolved. BigInteger.js now works as a polyfill for the native BigInt.

zgayjjf commented 5 years ago

This is a breaking change, you should update your major or minor version, instead of just updating patch version.

peterolson commented 5 years ago

Could you clarify why it is a breaking change? What previously-functioning code is this change breaking?