4 ms·
Interesting that drogon is relatively new (first release a year ago; new to Round 19) and is utterly destroying the benchmarks. https://github.com/an-tao/drogon
by minimaxir 6y ago
Interesting that drogon is relatively new (first release a year ago; new to Round 19) and is utterly destroying the benchmarks. https://github.com/an-tao/drogon https://github.com/an-tao/drogon
Show HN: https://news.ycombinator.com/item?id=19427332 https://news.ycombinator.com/item?id=19427332
- umvi 6y agoWell, it's hard for high level scripting languages to compete with C++ performance-wise... I would have liked to see some other C++ ones on there, like Crow[0] [0] https://github.com/ipkn/crow https://github.com/ipkn/crow
- continuations 6y agoLast committed 2017. Looks like it's dead?
- marricks 6y agoI heard some old guard person at Mozilla talk about these benchmarks last year when Rust's ACTIX was on top, something like "whatever is the latest framework can take advantage of all the latest methods and libraries to become the fastest", at the time I took it to mean ACTIX being the fastest has more to do with it being new then it being written in rust. Given a newcomer is at the top again that seems to ring true? Does seem odd older frameworks wouldn't keep up with that game, but perhaps once they get the publicity and user base they can worry more about features than having the highest benchmark?
- ori_b 6y agoPeople ask for more features over time. I'd expect older frameworks to be more featureful, but slower.
- Klonoar 6y agoIt's worth noting that actix-web is at the top by doing some insane tricks, which you wouldn't normally do in writing a web application. e.g at one point they used Askama as their templating engine (may have switched), which isn't really fair as using Askama means you force a recompile of your project for each template change - and I can tell you from experience that your compile times will shoot through the roof as well. Nobody is going to bother doing that. I say all of this as an actix-web user. It's my go-to. I just view these benchmarks as "if I ever needed to, I know I can wrangle performance out of it... but I won't assume it by default".
- terhechte 6y agoBut most other projects on there do that as well. I regard tech empower as the maximum performance I can get with a given framework if need be. With actin I can add Askama, with Vapor, there's no way to make it faster. As a side note, Ramshorn is even faster than Askama and does not need compiled templates: https://github.com/maciejhirsz/ramhorns https://github.com/maciejhirsz/ramhorns
- Klonoar 6y agoRegarding your first sentence... I think we have the same conclusion. :) Thanks for the heads up re: Ramhorns. I'd seen it before but Mustache templates aren't particularly my thing - Django/Python guy in a previous life, so I've got love for the templating models from there. Willing to sacrifice a small amount of speed for developer ergonomics, things almost universally get rewritten once big enough scale comes into play anyway.
- chrismorgan 6y agoI don’t think recompiling for template changes is as unreasonable as you depict. It’s a standard technique in various languages, though I acknowledge that they’re mostly not languages that compile to native code, but rather an IL (e.g. ASP.NET with Razor) where the compilation time is somewhat lower. For a language like Rust, compilation times and tooling support mean that the technique is perhaps not ready for prime time, but it’s fundamentally a perfectly sound technique, and can produce wondrous developer ergonomics (again I cite Razor). There’s something quite incongruous about using dynamically-typed and basically uncheckable template language when you’re doing the rest of the code in Rust.
- Klonoar 6y agoI didn't say that recompiling template changes is bad - e.g, you can accomplish the same result with much faster turnaround time using Tera, and for most projects the speed is in no way a bottleneck.
- littlestymaar 6y ago
- chiefsucker 6y ago> "whatever is the latest framework can take advantage of all the latest methods and libraries to become the fastest" I’m not sure I understand this, i. e. TRANTOR (which is the underlying network library for Drogon) recently merged in a patch that optimizes memory handling in a low level component of its event loop where object construction was minimized (first tests show another performance increase of about 5–10% on top of the current benchmark results). I fail to understand how such improvements have something to do with “all the latest methods and libraries”?
- Isomorpheus 6y agoWhat's impressing to me is that in the most "IO-bottlenecked" benchmarks: 'Multiple queries' and 'Data updates' (on Cloud) Drogon is smoking the next best frameworks. What's up with that?
- orthoxerox 6y agoPostgres libs for C++ are probably very good at async.
- chiefsucker 6y agoOne of Drogon’s project goals is great performance. That’s also one of the reasons why it’s written in C++.