Closed thisago closed 1 year ago
I think that I fixed all the requested changes in the last commit:
v
counter var to argNum
i
var starts in 0 (not -1 anymore)I guess it's a WIP for now, amirite?
I'm already using it and looks good for me, the requested changes was done
but if you'd be interested to adding benchmarks that illustrate the performance boost that would be great.
haha, ok, there's a better way to do the benchmark or just run it with time
?
but if you'd be interested to adding benchmarks that illustrate the performance boost that would be great.
haha, ok, there's a better way to do the benchmark or just run it with
time
?
I was planning to use benchy for it.
The way I see it:
benchmarks
folder.bench
task to norm.nimble.So, the old implementation was replaced, I will put a copy of the old implementation in the benchmark file just for it, ok?
- Add a benchmark that updates 1000 rows
1k of rows is too much to make multiple tests like benchy does... I'll limit to just one test ok? or you prefer to reduce rows, like 100 to repeat 10 times?
I ran 2 times the benchmark with 1k of rows and the result is very satisfactory: (for sqlite)
1th
min time avg time std dv runs name
133.105 ms 133.105 ms ±0.000 x1 Bulk update
139891.469 ms 139891.469 ms ±0.000 x1 Update each row
2th
min time avg time std dv runs name
129.890 ms 129.890 ms ±0.000 x1 Bulk update
138162.341 ms 138162.341 ms ±0.000 x1 Update each row
I updated the benchmark code to generate the DB just one time and copy into another file to modify.
I added also an indicator of DB generation progress, it shows a dot for every added row.
Also, an important thing to add next is bulk insert because inserting 1k of simple rows are too slow...
Another benchmark result:
min time avg time std dv runs name
182.585 ms 182.585 ms ±0.000 x1 Bulk update
174604.512 ms 174604.512 ms ±0.000 x1 Update each row
I'll do some minor fixes myself later and cut a new release.
Thanks for the great work!
For now, just SQLite module is updating with single query, soon I'll implement in PostgresNow I added bulk update for SQLite and PostgreSQL, The tests are running well
Closes #188