--- Ben Supnik <[EMAIL PROTECTED]> wrote:
> I am porting my app's data model from C++/STL to sqlite.  My goal is 
> scalability - even if I implement my data model in C++ using data 
> structures that give me good O(N) time (e.g. use trees, hash tables, 
> etc.) the whole thing has to be in memory, and adding indexing means a 
> pretty big code churn.
> 
> My question is:
> 
> If I take all of the sqlite optimizations I should be taking (saving my 
> SQL query statements in compiled form to avoid recompiling over and 
> over, having enough pages in memory to avoid disk thrash, using 
> transactions to limit disk I/O)....
> 
> Does anyone have sqlite and STL experience to tel me how the speed of an 
> indexed column of integers in sqlite would compare to a set<int> in C++? 
>   (I believe my set implementation uses a red-black tree.)

An STL set<int> would be around 1,000 times faster than SQLite.

It's not a fair comparison, though. STL does not have to be persistant,
nor does it have to worry about marshalling and unmarshalling, different
byte order machine words, locking, concurrent reads and writes and thousands
of other things that a database must do.



 
____________________________________________________________________________________
It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to