Our approach to byte order independence was fairly simple, and worked well with a mmap'd index. It involved keeping the just word pointers in a local byte ordered block if the machine were a different Endian. The overhead was next to insignificant. Our indices were all byte order independent.

Avoiding buffer shadowing seemed to be one big win, and the other was letting the OS VM management take control.
JS

Nathan Kurz wrote:
On Wed, Mar 22, 2006 at 10:41:23AM +1100, John Stanton wrote:

The mmap'd index was about three times faster than when it used a LRU paged cache.


I looked fairly closely into the possibility of using mmap for the
SQLite btree backend, and realized that it would be quite difficult.
Because the SQLite file format is host byte-order independent, it's
almost impossible to use mmap without a separate cache.  If one were
to give up on the cross-platform portability, I think one could get a
significant speedup on large file access, but it would be necessary to
write/adapt the entire backend rather than just making small changes.

Nathan Kurz
[EMAIL PROTECTED]

Reply via email to