Conversation
|
As in this variant of buffer it is difficult to achieve the same behavior as initial Lepton implementation on very small buffers (specifically before minimal stream length is 4 bytes, while here it can be shorter writing down only real stream bytes) - hashes of streams in two tests are changed. I have checked that DropBox Lepton can decode files obtained by this implementation. |
|
Taking into account that decoding of the formed Lepton file takes |
|
Now it is even faster: |
|
That's great! I'll need to test with the corpus to make sure that all the files are decodablet that will take a couple days. |
|
Using the same scheme of making checks more rare as in reader, I've got even to After merging this PR I prepare another with these improvements. |
8e6e003 to
6aa873e
Compare
|
Rebased. |
|
@mcroomp, any news about corpus test? |
|
Looks good... looks like it produces the same bits as before (except for one byte less sometimes at the end). |
This PR extends internal
low_valuebuffer of bit writer and sends as many bytes as possible when number of stream bits inlow_valueexceeds MAX_STREAM_BITS. It gives substantial performance gain due to much better branch prediction onif count >= 0- now it is very rarely true.Current
main7ee30b6This PR 0426f91