cryptocoinjs/bs58 — pull request #8 by dcousens (2014-07-24 17:35:23+00:00)
Title: Opti

As demonstrated by http://jsperf.com/base58-array-ops, and even a basic understanding should make it clear, using `unshift` is much slower than using `push` in `Array` operations as each `unshift` is an O(n) operation.

This change just reverses the operation order on the array so as `push` becomes possible, with a single O(n) reversal done at the end of the function.
On Chrome, this gives a slight (~10%) improvement, but on Firefox 30 it gives up to a 50% improvement in ops/sec.