Am 24.11.2015 um 19:01 schrieb Adam Strzelecki:
Hello,
I am an author of some more lightweight benchmark WebFrameworkBenchmark, it is much simpler but also more friendly benchmark than Techempower's Benchmark.
I wanted to ask you to have a look at my Vibe.d results, which are pretty disappointing, just below Ruby performance and far below C and Java frameworks. Vibe.d looks really nice, it has interesting features, but its performance really needs some love (aka optimizations).
I tested a bit and here are some results:
DMD debug, nogc, singlethread: 30kreq/s
DMD plain, nogc, singlethread: 32kreq/s
DMD release, nogc, singlethread: 61kreq/s
DMD release, nogc, singlethread, libasync: 62kreq/s
GDC release, nogc, singlethread: 63kreq/s
GDC release, nogc, multithread: 64kreq/s
GDC release, gc, singlethread: 58kreq/s
GDC release, gc, multithread: 59kreq/s
release: "dub -b release"
nogc: versions "VibeManualMemoryManagement"
multithread: HTTPServerOption.distribute
Using multiple cores doesn't improve performance by much, indicating
that some shared resource is the bottleneck, but this may simply because
the CPU on my Laptop is just a dual-core (plus hyperthreading) - I'll
have to retest on another box. But building in release mode had a big
impact. DMD interestingly did pretty well compared with GDC.
When looking at the profiler output, there is nothing obvious. A lot of
small things that could hopefully be eliminated, but nothing that looks
like a performance regression.
BTW, I think it would be good to add an additional, more complex test.
Nothing involving a database, but some typical operations, such as JSON
parsing/generation or dynamic page rendering and possibly some CPU
computation. That could easily dwarf the impact of pure request
processing. But as always, the benchmark setup of course depends a lot
on the targeted use case.
One thing that I found during my earlier benchmarks is that testing on
localhost vs. over a real network connection can change the outcome
considerably - also the relative outcome between the different server
implementations. So if possible I'd benchmark between two about equally
fast machines connected with a GbE connection (hopefully it won't saturate).