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.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to