New: JSBI, a pure-JavaScript BigInt implementation
JSBI makes it possible to use spec-compliant BigInt functionality *today*, in all browsers, without sacrificing compatibility.
https://github.com/GoogleChromeLabs/jsbi …
-
Show this thread
-
Sadly, transpiling BigInt code is not feasible, since it involves operator overloading. https://github.com/GoogleChromeLabs/jsbi#why … So JSBI tackles this problem from the opposite angle.
3 replies 3 retweets 11 likesShow this thread -
Replying to @mathias
Well you *could* transpile every single `a + b` into `isBigInt(a) ? a.add(b) : a + b`, but this would probably result in a slowdown. I wonder if TypeScript could use the type information it already has to do that only as necessary.
1 reply 0 retweets 0 likes
Replying to @jamesernator
Indeed. It would bloat the transpiled file size and significantly slow down transpiled code in general. (The README talks about this in some detail, FWIW.)
3:55 PM - 8 Nov 2018
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.