![]() ![]() Actix WebĪctix Web is a light framework written in Rust. Fortunes requires a greater range of important real-world functions to all perform well. The trouble with the simpler tests that do something like send a canned JSON response is that they have more than a dozen frameworks that perform almost identically – they’ve all excelled at ensuring that one short piece of the pipeline is well optimized. The message text must be considered untrusted and properly escaped and the UTF-8 fortune messages must be rendered properly.įortunes is the most interesting of TechEmpower’s tests because it does more. Finally, the list is delivered to the client using a server-side HTML template. ![]() An additional fortune cookie message is inserted into the list at runtime and then the list is sorted by the message text. GET POOL FROM ARBITOR ACTIX CODEIn this test, the framework’s ORM is used to fetch all rows from a database table containing an unknown number of Unix fortune cookie messages (the table has 12 rows, but the code cannot have foreknowledge of the table’s size). These are the results from the Fortunes test type, which tasks implementations with a simple but realistic workload exercising HTML rendering, DB communication, and unicode handling. Projects in TechEmpower provide implementations for six different “test types” that vary in requirement from sending a simple plaintext response to more complex workloads involving databases. 18, run last July) was Actix Web pulling ahead of the rest of the pack by a respectable margin: Round 18 + FortunesĪn upset during the latest round ( no. ![]() Results aren’t perfect, but they give us a rough idea of relative performance. For example, no matter how heavily one of the Ruby implementations is optimized, it’ll never beat PHP, let alone a fast language like C++, Go, or Java – the inherent performance disparity is too great. That said, even if benchmark games don’t tell us everything, they do tell us something. It tends to be less of an issue in the long run as benchmarks mature and all implementations get more optimized, but it’s a good idea to consider all benchmarks with a skeptic’s critical mind. Two languages/frameworks may have similar performance properties, but one of the two has sunk a lot more time into optimizing their benchmark implementation, allowing it to pull disproportionately ahead of its comrade. ![]() Many in the web development community will already be familiar with the TechEmpower web framework benchmarks which pit various web frameworks in various languages against each other.īenchmarks like this draw fire because although results are presented definitely, they can occasionally be misleading. The keystones are finally set, ready to bear load. But there’s good reason to be optimistic about the state of Rust coming into 2020 – critical features and APIs have stabilized, substrate libraries are ready and available, tooling is polished to the point of outshining everything else. The language and its ecosystem have seen a lot of change over the last few years and I would have advocated against it in serious projects for its evanescent APIs alone. I’m playing with the usual format to do a medium dive into an active frontier: web technology in Rust. If you’re viewing it on the web, as usual you can opt to receive a few more in the future by subscribing here. Theoretically you signed up for this, and probably did so in the last week or two – but if you’re looking to shore up your mail subscriptions in the new year already, there’s an easy one-click unsubscribe in the footer. You’re reading the first 2020 edition of Nanoglyph, a fledgling newsletter on software, sent weekly. Here’s to hoping that everyone had a good break (or at least a few days off), set or didn’t set resolutions, and is refreshed and ready for what comes next. It’s already been a great reading day for retrospectives on the last ten years / predictions for the next. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |