The benchmark numbers are here; 
[https://www.techempower.com/benchmarks/#section=test&runid=ecfbe3c9-f577-4836-9403-41f9120dfc6e&l=zdk8an-1kn](https://www.techempower.com/benchmarks/#section=test&runid=ecfbe3c9-f577-4836-9403-41f9120dfc6e&l=zdk8an-1kn)

nim stdlib is showing 0.6% of the top framework in Rust. Now while I don't 
expect nim to come in the above 60% group as most of those frameworks abuse db 
pipelining, I was expecting Nim to fall in the general area around crystal, 
kotlin etc - at about 20%+ of the fastest frameworks out there. 0.6% means 
there is some serious problem with the db driver. If you look at the other 
benchmarks, which are not about db connections, Nim ranks fairly high.

Here's the link to the code. 
<https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/Nim/nim-stdlib/src/handlers.nim>

I had actually written this PR. I like Nim and really wanted it to work for me 
in webdev, but the benchmark numbers are way too low.

@treeform, while db_postgres uses libpq internally, I am not sure it uses async 
queries properly - which is a huge speed loss. WHile your library wraps 
db_postgres in async, I am not sure if there is much improvement in perf if 
db_postgres internally doesn't use the async query apis. 
<https://www.postgresql.org/docs/current/libpq-async.html>

@polarian, thanks! but the benchmarks use extremely simple data insertion and 
queries and the same db data apply to all benchmark targets. 

Reply via email to