peter-lawrey/Java-Chronicle — pull request #28 by abissell (2013-05-08 08:14:38+00:00)
Title: Optimizations for AbstractExcerpt.appendLong0() and .appendDouble0()

I imagine most clients are using `writeLong()` and `writeDouble()` most of the time anyway, but I was able to make these other appending functions run a little faster by eliminating the need for an `Arrays.binarySearch()` on the powers of 10. It's about a ~30% improvement over the existing code.

It appeared to me that the `AbstractExcerpt` is intended to be used thread locally. If that's not the case, then the buffers which I added to the class would need to be put in a `ThreadLocal` (a quick single-threaded benchmark indicated this wasn't a crippling performance hit or anything).

All the tests currently pass. I added `NewVsOldNumberAppendTest` to allow the existing algorithms to be compared against my proposed ones.

Of course, I'd always be interested to hear if the code is broken in some subtle way as well. :)