Comment on PivCo-Huffman “merge” operations by nickrterrell

Thanks for the great post!
I ended up with a very similar merge loop as yours in my implementation, but I didn't have the vnot(index_vec) trick. It is obvious in hindsight, which the best tricks are.
One small trick that I've found helps in the merge loop, if you're willing to pay the code size for unrolling the loop (and it doesn't have other negative side effects), is you can avoid the subtraction in l_list += 16 - popcnt. For example:gist.github.com/terrelln/1d8843def1b229f3e2470ebc9d6becc4
评论
?
参与讨论