Greg Hurrell [Sat, 1 Aug 2015 14:06:14 +0000 (07:06 -0700)]
Avoid unnecessary base conversions
Instead of converting to a canonical hexadecimal base format, let the
updating component juts pass back the raw value + base. This should cut
the number of conversions by about 25%. For example, if I change the
binary field, instead of converting to hexadecimal once, then from
hexadecimal to some other base for three of the four fields (ie. four
total conversions), we instead just convert three fields.
Greg Hurrell [Sat, 1 Aug 2015 01:54:37 +0000 (18:54 -0700)]
Don't mutate input array in joinDigits()
`reverse()` is a nasty API. It returns the reversed array, but also
mutates it in place. Noticed while using `joinDigits()` to log stuff
while developing.
This might be hard to implement though. I was thinking it might call for
a heap but I don't think so; it just needs a stack, and we pop off until
we get a usable value from it.
This is a mess of things that should be committed separately, but rather
than do that I think I am just going to squash the history before
publishing. Or not. Possibly can't be bothered.
Create new unparented branch for JavaScript implementation
Getting this ancient codebase building on Yosemite is going to be more
trouble than it's worth (Xcode has changed too much, and GMP was always
hard to compile at the best of times), so let's rebuild this in
JavaScript as a web app.