D. Richard Hipp wrote: > Most varints are "type varints" and type varints are almost always a > single byte (the only exceptions being for large blobs or strings). > Varints are also used to store the total number of bytes in a row > (also usually one byte). Most varints are a single byte. > > We, too, have profiled, and we agree that a lot of time is spent > decoding varints. As you have already observed, the common case of a > single-byte varint is usually handled by by a macro and so never calls > the sqlite3GetVarint() decoder function. And sqlite3GetVarint() is > very carefully coded to be fast even when it is called. The varint > decoder is one of the more carefully scrutinized parts of SQLite. > > I'm scanning through some profiling output now and I'm seeing that > some varints are almost always a single byte (only 60 multibyte > varints out of 474350, in one example) while others are multibyte > about half the time. I'm not seeing any cases where more then half > the varints are multibyte. > > > Sorry I missed the obvious. Multi-byte about half the time. Read the numbers, skipped the words. My grade school teachers would not be surprised.
Question already answered. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users