TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lithium ranked the highest performance web application platform

99 pointsby matt42almost 5 years ago

21 comments

bhaueralmost 5 years ago
Brian from TechEmpower here. I don&#x27;t want to take away from these results, but I do want to provide an important piece of context. This link is to a rendering of data from a continuous run [1] that hasn&#x27;t received the type of sanity checking we do for an official TFB round. You can tell from the title (&quot;Test&quot;) and the UUID of the run visible in the gray box under the navigation. Based on this link&#x27;s attention, we&#x27;ll make a more prominent warning for renderings of continuous runs so that they are more obvious to readers not familiar with the project.<p>We execute runs like this continuously to allow maintainers of test implementations to observe the results of their contributions. Given the performance seen here, it is <i>very likely</i> that Lithium will be well ranked in the next official round. But we feel the ranking seen in a continuous run such as this should be taken with a grain of salt until that next official round is available.<p>[1] <a href="https:&#x2F;&#x2F;tfb-status.techempower.com&#x2F;results&#x2F;57b25c85-082a-4013-b572-b0939006eaff" rel="nofollow">https:&#x2F;&#x2F;tfb-status.techempower.com&#x2F;results&#x2F;57b25c85-082a-401...</a>
评论 #24317098 未加载
评论 #24317139 未加载
The_rationalistalmost 5 years ago
I had investigated what explained the huge gap between the few fastest frameworks vs the rest. The answer is a deceptive one, they didn&#x27;t achieve revolutionary optimizations. The thing is: on many of those benchmarcks, the bottleneck obviously is the DB. The ability to do DB queries asynchronously and with batching is the differentiating factor. Only postrgresql can support such a feature but you need support on the postrgresql client too. The official C postrgresql client used everywhere does not support said feature except with a patch from 2016. Yes the secret of drogon (and probably of Lithium) is that they use a fork of libpq from 2016 because upstream can&#x27;t agree on merging the patch and nobody is working on upstreaming it. Actix web benefited from the feature because their client tokio-postgres is a reimplementation and does not use libpq.<p>The industry grade server ecosystem that is the JVM use the jdbc which sadly has a blocking socket thus not allowing asynchronicty. But when loom arrive every jdbc existing code will magically, automatically become truly asynchronous such spring should come on the top 4 place.<p>There is also a wrapper of the jdbc through kotlin coroutines and there are reactive jdbc implementations such as R2DBC. It is unclear as of today if such solution enable postrgresql async queries and batch processing. It seems that nobody has tried those on TechEmpowerUp which is sad. Finally one could use libpq over JNI. Edit: I have read that the next release of pgjdbc (43) will switch from std socket to the NIO non blocking socket.<p>What should be heuristically the fastest HTTP framework (H2O, in C) has refused to use the old libpq fork because the api is not stable and thus not production grade.
评论 #24315558 未加载
评论 #24318091 未加载
评论 #24315557 未加载
andybakalmost 5 years ago
Is this a criteria that&#x27;s important enough to warrant this much effort?<p>I can think of several metrics that would come first - even for sites with fairly high performance requirements.<p>How often is the web framework genuinely the bottleneck (at least in a way that&#x27;s not easily fixable with caching or any other similar sledgehammer)?
评论 #24315570 未加载
评论 #24315513 未加载
评论 #24315487 未加载
评论 #24316568 未加载
评论 #24316493 未加载
评论 #24315610 未加载
matt42almost 5 years ago
Link to the lithium homepage: <a href="https:&#x2F;&#x2F;github.com&#x2F;matt-42&#x2F;lithium" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;matt-42&#x2F;lithium</a>
评论 #24315531 未加载
评论 #24315390 未加载
评论 #24315394 未加载
评论 #24317493 未加载
评论 #24316562 未加载
supermattalmost 5 years ago
Incredibly frustrating the benchmarks not linking to the actual frameworks - searching for &quot;lithium web framework&quot; gives me some PHP framework...<p>Edit: Comment lower down suggests: <a href="https:&#x2F;&#x2F;github.com&#x2F;matt-42&#x2F;lithium" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;matt-42&#x2F;lithium</a> is the correct one.
评论 #24317230 未加载
评论 #24316765 未加载
评论 #24316447 未加载
评论 #24316446 未加载
评论 #24320997 未加载
评论 #24316629 未加载
9wzYQbTYsAIcalmost 5 years ago
Interesting to see asp.net at the very bottom of the list of 100+ and asp.net core in the top 10.
评论 #24317154 未加载
评论 #24316567 未加载
评论 #24316516 未加载
paultopiaalmost 5 years ago
I&#x27;m more interested in the fact that something called asp.net core is one of the five fastest, while asp.net not &#x27;core&#x27; is the single slowest. What&#x27;s the deal there? I dimly know that asp.net is a Microsoft thing, and remember it being used by a bunch of enterprise sites a decade or so ago...
评论 #24315563 未加载
评论 #24315662 未加载
评论 #24317935 未加载
评论 #24315579 未加载
评论 #24315556 未加载
karmakazealmost 5 years ago
I really do like these TechEmpower Fortunes benchmarks. It has quite an extensive list of frameworks, languages, and configurations with throughput, latency (w&#x2F; SD), and errors.<p>I always check any lesser known framework to see which ballpark it falls into. I&#x27;m always surprised to see that so many of the popular frameworks are ~10x worse than the best--although many of those &#x27;best&#x27; don&#x27;t do as much processing. I&#x27;m much more likely to pay attention to the error counts, max latency, or SD (σ).
dathinabalmost 5 years ago
I wonder how realistic&#x2F;fair the code of some benchmarks is.<p>I just took some small peak at atix (because I happen to know it) and while first all looked fine it wasn&#x27;t quite that realistic.<p>Mainly:<p>- It uses a fork of tokio-postgres specific for the test (which differs in that Client is no longer send and it has a Unsafely soundness hole by wrongly using Unsafe Cell, and no Issue tracking enabled on, through replacing that cell with RefCell probably yield very similar performance)<p>- Instead of using the default web::Json responder it uses simd-json (EDIT: explicitly encoding the data into a buffer instead of returning it wrapped in web::Json)<p>- Uses snmalloc instead of the default allocator (<a href="https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;snmalloc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;snmalloc</a>)<p>Just to be clear besides the first point all of this is not unrealistic for a context where you want to highly optimize your server. But not how actix is used most of the time.<p>---<p>Edit: Also just to be clear I didn&#x27;t nit pick intentional on actix, it just happen to be the framework I&#x27;m more familiar with and especially using snmalloc for actix seems to be quite a reasonable idea.<p>EDIT2: The Unsefety unsoundness isn&#x27;t triggered given the way this library is used, it&#x27;s still there and would prevent this change from ever been merged upstream.
ex_amazon_sdealmost 5 years ago
Most of the time the framework is not in the top 10 bottlenecks of your application.<p>Optimize your webapp before hunting for the fastest frameworks.
评论 #24315587 未加载
评论 #24317999 未加载
montroseralmost 5 years ago
On lithium&#x27;s JSON parser, they describe:<p>&quot;Only cases where the structure of the object is known at compile time are covered.&quot;<p>Numbers are impressive, but there are some big trade-offs that come with.
评论 #24315361 未加载
评论 #24317374 未加载
评论 #24315646 未加载
foolinaroundalmost 5 years ago
Link to the project : <a href="https:&#x2F;&#x2F;github.com&#x2F;matt-42&#x2F;lithium" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;matt-42&#x2F;lithium</a><p>not obvious from a google search
tluyben2almost 5 years ago
Offtopic: matt42 (or others); where do I learn modern optimization like this? I can optimize for cycles on embedded MCU&#x27;s and older computers and I can optimize in .NET&#x2F;JVM (and others) but are there any good sources for OS on modern metal optimizations? Besides reading the Lithium sourcecode ofcourse.
评论 #24317384 未加载
rapfariaalmost 5 years ago
Anybody else&#x27;s laptop activates their fans when visiting this?
评论 #24315680 未加载
pknerdalmost 5 years ago
Thanks to Google, The PHP Framework, Lithium will get some unwanted praise here.
matt42almost 5 years ago
I&#x27;m wondering why this post got suddenly removed from the front page...
评论 #24316803 未加载
评论 #24316524 未加载
评论 #24317093 未加载
bsaulalmost 5 years ago
has there ever been a code created just specifically for this benchmark, in assembly language with everything hard-coded, just to see what the upper bound is ?
评论 #24315644 未加载
thdrdtalmost 5 years ago
Wow, the difference between .Net core and .Net!
RocketSyntaxalmost 5 years ago
just ahead of jooby and kooby
fluffy87almost 5 years ago
2x faster than the Actix Rust framework.<p>Rust, C++ just said “hi” to you again, it’s on. Time to make Actix fast.
评论 #24315665 未加载
polotealmost 5 years ago
Lithium is the fastest web framework among the frameworks that nobody use<p>Seriously why is this reaching the front page, who really care about such benchmark ?
评论 #24315387 未加载
评论 #24315625 未加载
评论 #24315406 未加载
评论 #24315678 未加载
评论 #24315386 未加载