upvote
It's not terribly fast. It's faster than LEB128 but not as fast as vu128 (at least according to https://github.com/Jiboo/varint_benchmark)
reply
The post says the purpose of exploring this space (which is a fun one) wasn't speed, but representation. The speed gain was an added value.

I'm not saying SQLite's varint implementation is ideal for every application. It's just an implementation that is one of the most used implementations, if not the most (I'd bet it is by a large margin though). It just seemed like a missed opportunity to compare it with the implementation they landed on.

EDIT: Just wanted to add, thanks for sharing that link. Interesting!

reply