3 ms·
For Rust, this benchmark tests Nickel, Iron, and Rocket; all of which are synchronous. Async really helps here!
by steveklabnik 9y ago
For 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!