On Thu, Nov 04, 2004 at 02:35:01AM +0100, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Umm, yup. Didn't read carefully. The test is a bit meaningless unless it measures read/write chain to an actual SQLite connection.
sqlite (and any db) overhead is much higher, of course, but the point is that string conversions are expensive. After all, sqlite is not only application where UTF8 may be used.
I don't agree that if something that is (relatively) "inexpensive" should be ignored completely - it is inexpensive only when you do a little bit of work with it.
It is like... the difference in 1 cent per 1 liter of fuel - it is less that 1% of liter's price, but when you tank a lot, have an army of trucks and count your spending during 1 year - it makes difference.
That's why I prefer search_reverse(x,y) (written in C) instead using search(reverse(x),reverse(y)), which is "almost invisible" when you do it once or twice, but becomes visible when you do it a lot and on huge strings. The same applies to conversions...
I just don't want to pay extra price when I can easily avoid this, that's all.
Back to SQLite - I am against _implicit_ conversion (which cannot be turned off), because this forces me (= leaves no choice) to use conversions.
Regards, /Al