4 ms·
Which is the fastest web framework?
- steveklabnik 9y agoFor Rust, this benchmark tests Nickel, Iron, and Rocket; all of which are synchronous. Async really helps here!
- hawkice 9y agoWhy? I looked at the code, it doesn't really do anything with the request, shouldn't be blocking any threads or anything.
- steveklabnik 9y agoIt's not in the program itself, it's in the frameworks. That is, the way the frameworks handle the HTTP requests uses blocking IO. There are other frameworks that are non-blocking; they just didn't include them. To be fair, Iron and Nickel are the old guard of frameworks, and Rocket is one of the new, hyped ones, but they don't use any async stuff. This isn't so much blaming the benchmark as it is adding context!
- JoshGlazebrook 9y agoIs this essentially this again? https://www.techempower.com/benchmarks/ https://www.techempower.com/benchmarks/ They appear to have slowed down in the frequency of test rounds though.
- erickj 9y agoWhat is crystal? And where are Java & C++? Also, who the hell writes web frameworks in Objective-C? Also... does anyone notice that this test shows that the web framework hosted under the same github account is the fastest. edit: re: "What is crystal?" https://github.com/crystal-lang/crystal https://github.com/crystal-lang/crystal ... I will say, I'm intrigued. I do love ruby, but unfortunately also hate dynamic typing. Crystal seems interesting.
- AnimalMuppet 9y ago> Also... does anyone notice that this test shows that the web framework hosted under the same github account is the fastest. That does seem suspicious. On the other hand, that's precisely the party that would have the most incentive to publicize the results of the tests...
- squiguy7 9y agoCrystal is a relatively newer language aimed to combine Ruby's syntax with the speed of C per it's project page [1]. [1]: https://crystal-lang.org/ https://crystal-lang.org/
- dionian 9y agonot to mention CGI
- jsgo 9y agoI'm looking at the contributors in crystal-lang/crystal and I don't see "tbrand" there. That said, the repositories they do create seem predominantly crystal related, so they're certainly a user of it.
- shirian 9y agoIs the term "framework" really the best descriptor for this type of chunks of code?
- myaso 9y agoHow important is speed really? It's not like it's the only parameter you can measure a framework by, just happens to be the only quantifiable one.
- daniel_iversen 9y agoI think PHP is still the most popular web app language, a shame it’s missing out having a couple of it’s frameworks included in the test.
- forgot-my-pw 9y agoCan already guess they'll be at the bottom. Laravel, Symfony are pretty dang slow as frameworks.
- corobo 9y agoAlso without testing them to get the stats to prove/disprove my statement I'm going to say the exact opposite. Can already guess they'll be at the top. Laravel, Symfony are pretty dang fast as frameworks!
- forgot-my-pw 9y agoThey're already among the slowest in PHP: - https://github.com/kenjis/php-framework-benchmark#hello-world-benchmark https://github.com/kenjis/php-framework-benchmark#hello-worl... - https://medium.com/@asked_io/php-mvc-framework-showdown-7-1-performance-2da52ac9fcba https://medium.com/@asked_io/php-mvc-framework-showdown-7-1-...
- jontro 9y agoDoesn't look like the test is warming up the web server. It sleeps 10 seconds (I assume) after starting the server but it might just as well fire some warmup requests. https://github.com/tbrand/which_is_the_fastest/blob/master/tools/src/benchmarker.cr#L137 https://github.com/tbrand/which_is_the_fastest/blob/master/t...
- mmanfrin 9y agoThis is measuring startup time, not actual request time. This seems nearly worthless unless you are looking to host something on AWS Lambda? Does the author honestly believe GET requests to rails sites take 2 and a half minutes on average?
- jontro 9y agoThe client is sending 5000 requests * 16 threads from what I can see. Still seems like a useless microbenchmark.
- godinaa 9y agoI understand wanting to show off your latest project, but comparing a large framework like Rails to your couple hundred lines of crystal is not an honest comparison, not even taking into account the concerns of startup time as others mentioned.