utils.go performs a lot of intermediate buffer allocations for converting byte sequences to int32, etc. This results in a lot of unnecessary allocations which can pretty substantially slow down reads.
I added a small benchmark in decode_speed_test.go. It shows off the difference pretty clearly:
In this case, my synthetic benchmark runs about 43% faster just by removing the intermediate allocations. I have production DBs with several hundred integer columns, which saw ~300% speedups with this change.
utils.go performs a lot of intermediate buffer allocations for converting byte sequences to int32, etc. This results in a lot of unnecessary allocations which can pretty substantially slow down reads.
I added a small benchmark in decode_speed_test.go. It shows off the difference pretty clearly:
In this case, my synthetic benchmark runs about 43% faster just by removing the intermediate allocations. I have production DBs with several hundred integer columns, which saw ~300% speedups with this change.