Added profiling and removed floating-point math

The floating-point math was replaced with simple integer addition. It isn't any faster since it wasn't a bottleneck to begin with, but it removes a lot of the flakiness inherent in the old design. It should now work fine for any number of elements past 17 billion.

Also added incredibly basic profiling stuff.