dcousens/bitcoinjs-lib — pull request #1 by weilu (2014-04-07 13:16:58+00:00)
Title: Replace bigi with bigint (for node) + bigint-browserify (for browser)

This takes bitcoinjs/bitcoinjs-lib#117 one step further and potentially closes bitcoinjs/bitcoinjs-lib#24.
- Use of bigint will improve performance on node.js
- bigint-browserify uses jsbn (as a dependency which is modularized from the original jsbn) under the hood. It wraps jsbn with the bigint interface, which supports buffers out of the box.
- The bitcoinjs-lib specific BigInteger helper methods are patched in bigint.js and tested.

One notable inconsistency is that jsbn rounds towards zero for integer divisions, e.g. 10 / -3 = -3, whereas bigint rounds towards negative infinity, e.g. 10 / -3 = -4. I'm not sure if it affects us in any way.

Browserify couldn't seem to pickup the patched methods on BigInteger.prototype. I'm still looking into that.