On 24 Nov 2011, at 5:10pm, Jay A. Kreibich wrote:

> On Thu, Nov 24, 2011 at 08:08:12AM +0000, Simon Slavin scratched on the wall:
> 
>> It is faster to search integers than it is to search real numbers. 
> 
>  Why?  Both types are a string of 64 bits.  Both types use the same
>  integer-based logic for the =, <, and > operations.
> 
>  The only real difference is that integers are stored in a compressed
>  format.  While that means they have a higher CPU cost to decode, the
>  smaller size likely makes up for the encoding overhead with improved
>  I/O times.  I'm not sure there is a strong practical win, however--
>  especially if the data is in cache, or doesn't span several pages.

Hmm.  I really should check this out with SQLite.  It is generally true in 
computing.  It may not be true given how SQLite uses different numbers of bytes 
to store different sized integers.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to