> That is *EXACTLY* what I'm reffering to.  Is there any design info,
> rationale or pointers to what changes were made, and why the switch from a
> stack to register machine??  Also, is there any performance data?
>
>

There's a video where D. Richard Hipp talks about sqlite (interesting in
many other aspects also):
http://video.google.com/videoplay?docid=-5160435487953918649

He mentioned (about 30:00) that with register based engine is much easier to
generate instructions.

Below is my observations about the aspects that makes register-based engine
a better choice:
- vbe codes points to columns, tables and so on while actual data is placed
in the tables (persistent or temporal) so there are actually not so many
cases when you really need much data temporary available so several
registers should be enough
- As long as I noticed there's no such thing as procedures or functions in
the vbe programs, it's just a list of instructions. Stack is useful for
procedures to pass the context, but you don't actually really need it here.
- Operations of placing to stack and removing from it generally is not
expensive, but when an operation takes tiny fraction of time (for example
when the page is already in the cache), this might affect the performance in
general.

Also you can try to compare EXPLAIN QUERY result from a version prior to
3.5.5 to some of the current one for the same sql query. I wanted to do this
myself, but seems like can not access sqlite download page right now.

Max Vlasov
maxerist.net
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to