2 ms·
Interesting! I was actually just working on SQLite speed for Objective-S (http://objective.st http://objective.st), partly as a driver for getting some of the
by mpweiher 5y ago
Interesting!
I was actually just working on SQLite speed for Objective-S (http://objective.st http://objective.st), partly as a driver for getting some of the more glaring inefficiencies out.
Using a "to do list" schema, I currently get the 100M rows out in 56 seconds, which is around half the speed of the Rust example given here, but 3 times the speed of PyPy and almost 10x faster than Python.
This is from an interpreted script that not only does the inserts and creates the objects to insert in the first place, but also defines the actual class.
The lower-level code is written in Objective-C, like the rest of Objective-S.
Class definition:
class Task {
var <int> id.
var <bool> done.
var <NSString> title.
-description { "<Task: title: {this:title} done: {this:done}>". }
+sqlForCreate {
'( [id] INTEGER PRIMARY KEY, [title] NVARCHAR(220) NOT NULL, [done] INTEGER );'.
}
}.
Code to insert a computed array of tasks 10 times:
1 to:10 do: {
this:tasksTable insert:taskList.
}.