Author serhiy.storchaka
Recipients BreamoreBoy, Russell.Sim, dlenski, eric.araujo, ghaering, ncoghlan, petri.lehtinen, rhettinger, serhiy.storchaka
Date 2015-01-11.08:05:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420963511.16.0.935128546205.issue13299@psf.upfronthosting.co.za>
In-reply-to
Content
Here is faster implementation.

$ ./python -m timeit -s "import sqlite3; con = sqlite3.connect(':memory:'); con.row_factory = sqlite3.NamedTupleRow; con.execute('create table t (a, b)')" -s "for i in range(100): con.execute('insert into t values (1, 2)')" -- "con.execute('select * from t').fetchall()"
100 loops, best of 3: 2.74 msec per loop

But it is still 3 times slower than sqlite3.Row.
History
Date User Action Args
2015-01-11 08:05:11serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, ghaering, ncoghlan, eric.araujo, BreamoreBoy, petri.lehtinen, dlenski, Russell.Sim
2015-01-11 08:05:11serhiy.storchakasetmessageid: <1420963511.16.0.935128546205.issue13299@psf.upfronthosting.co.za>
2015-01-11 08:05:11serhiy.storchakalinkissue13299 messages
2015-01-11 08:05:10serhiy.storchakacreate