4 ms·
And I'm surprised by how terribly it ranks – basically dead last against everything, even the Python frameworks, which is impressive.
by fastball 3y ago
And I'm surprised by how terribly it ranks – basically dead last against everything, even the Python frameworks, which is impressive.
- jackmott42 3y agoIt isn't really a language community so interested in web server efficiency, and until recent years threading efficiently was kind of tricky with the GC scheme they used. If someone wanted Nim to rank high you could do it, but I'm not sure it is worth the effort?
- michaelsbradley 3y agoPossibly it wasn't compiled with `-d:release`. I only looked briefly — is there a way to see the source code and cli flags used for the various implementations?
- Jtsummers 3y agohttps://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/Nim/nim-stdlib/nim-stdlib.dockerfile https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast... That appears to be the docker file they used, it's compiled with -d:release.
- janAkali 3y agoNim's default json library is terrible in performance, but there're much faster drop-in replacements like jsony[1]. I'm not sure that's the main issue for low rank, but it's definitely one of them. 1. https://github.com/treeform/jsony https://github.com/treeform/jsony
- treeform 3y agoI would not call std/json it "terrible in performance" probably still way faster then what you get in many other languages (like python). But yes the JSON lib I wrote is faster due to avoiding branches and allocations.
- cmdlineluser 3y agohttpbeast[1] reached #6 at one point, but I think the author is busy with other things nowadays. https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=json https://www.techempower.com/benchmarks/#section=data-r18&hw=... [1] https://github.com/dom96/httpbeast https://github.com/dom96/httpbeast
- winrid 3y agoSums up most nim libraries unfortunatelly
- elp 3y agoInteresting. The Vercel benchmarks make it look pretty good. Only slightly behind rust. https://programming-language-benchmarks.vercel.app/zig-vs-rust https://programming-language-benchmarks.vercel.app/zig-vs-ru... Benchmarks are as much about the skill of the programmer as they are about the language. I suspect those numbers could improve drastically.
- 59nadir 3y agoYou've linked to Zig vs. Rust, which really should be outperforming Rust. The grandparent was talking about how Nim seems to be doing terribly.
- plainOldText 3y agoFor reference, here's some other benchmarks which show happyx (a Nim framework) to come on top: https://web-frameworks-benchmark.netlify.app/result https://web-frameworks-benchmark.netlify.app/result