TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Web Framework Benchmarks - Round 8

174 点作者 curiousAl超过 11 年前

32 条评论

zaroth超过 11 年前
It&#x27;s interesting to compare what the code looks like.<p>CPPSP (C++ Server Pages) which is putting up ridiculous numbers... here is the Single Query test:<p><a href="https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/cpoll_cppsp/www/db" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TechEmpower&#x2F;FrameworkBenchmarks&#x2F;blob&#x2F;mast...</a><p>It&#x27;s quite different from the more typical implementations, where they all sort of look the same...<p>(Go) <a href="https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/go/src/hello/hello.go" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TechEmpower&#x2F;FrameworkBenchmarks&#x2F;blob&#x2F;mast...</a><p>(NodeJS) <a href="https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/nodejs/hello.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TechEmpower&#x2F;FrameworkBenchmarks&#x2F;blob&#x2F;mast...</a><p>(Gemini) <a href="https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/gemini/Source/hello/home/handler/HelloHandler.java" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TechEmpower&#x2F;FrameworkBenchmarks&#x2F;blob&#x2F;mast...</a><p>Also interesting to compare it to C# &#x2F; HttpListener... which would benefit from moving all the framework code out into a separate library;<p>(C#&#x2F;HTTP.sys) <a href="https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/HttpListener/HttpListener/Program.cs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TechEmpower&#x2F;FrameworkBenchmarks&#x2F;blob&#x2F;mast...</a>
RyanZAG超过 11 年前
Interesting observation regarding the differences between the EC2 and i7 results: the platforms at the top of the EC2 benchmarks are generally MongoDB+async io java, while the ones at the top of the i7 results are MySQL+heavily threaded (go, servlet, openresty). I think it&#x27;s a pretty interesting result because it shows how much your choice of available hardware has on which platform would be best - and it&#x27;s not a small difference either.<p>If you&#x27;re going for an EC2&#x2F;digital ocean setup with a lot of small instances, then you want to go with something like vert.x or node or whatever - while if you are deploying directly onto bare metal high core&#x2F;ram servers, you&#x27;d be better off with something that is better at handling high thread counts - something like Golang.
评论 #6926249 未加载
curiousAl超过 11 年前
I&#x27;ve been following these for most of the rounds, and Go has been improving impressively. Whether that&#x27;s because of improvements in the language itself or a more zealous crowd sending pull requests, I don&#x27;t know, but it made me want to try go, so I did. It&#x27;s not as comforting as the scripting (PHP, Python, JS) languages I&#x27;m used to. Having no REPL and having to think about types takes a bit more getting used to than I thought (arrays vs slices&#x2F;maps, and having no REPL). I find having a quick build script (mine&#x27;s in vim) so you can compile+run and go back to the code quickly helps a lot. Also, <a href="http://play.golang.org/" rel="nofollow">http:&#x2F;&#x2F;play.golang.org&#x2F;</a> isn&#x27;t too shabby either.<p>It would be fun to see this project (<a href="https://github.com/TechEmpower/FrameworkBenchmarks" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TechEmpower&#x2F;FrameworkBenchmarks</a>) become more and more popular, with formidable developers squeezing out performance from their framework of choice.
评论 #6922920 未加载
ritchiea超过 11 年前
In the past I&#x27;ve noticed posters on HN picking on Rails by lazily linking to these benchmarks but click over to the average latency tab and Rails looks pretty solid with an average response latency of 1.8 ms, which is not at the very top but far better than Django, which is a comparable framework and is near the bottom of the average latency table.<p>If anything to me this data confirms that Rails is an amazing tool because not only do you get to develop quickly, but you also get pretty good average latency (or at least the potential depending on what you add to your app in terms of 3rd party libraries). And what Rails isn&#x27;t good at is throughput, which is almost never a problem for an early stage company.<p>Working at a startup it&#x27;s a huge success if I ever have to handle a lot of connections to my app, but today and everyday, I want fast response times on a page load.
评论 #6922823 未加载
评论 #6923002 未加载
评论 #6923705 未加载
评论 #6924889 未加载
评论 #6922863 未加载
sker超过 11 年前
HHVM and Dart seem to be the two new fast performers in town showing impressive performance in some tests. JS has been falling off the charts compared to some of the first rounds, but still a good option performance-wise. C# keeps sucking badly. I miss Nimrod&#x2F;Jester, I always wanted to see it in the top 10.
评论 #6922988 未加载
评论 #6923755 未加载
评论 #6926322 未加载
matrix超过 11 年前
These results are tempting me to do my next project in a modern lightweight Java framework. No Hibernate, bloated frameworks of yore, or weird complex build and dependency management. Play is ruled out - it&#x27;s Scala (Java is a second-class citizen in Play).<p>Maybe something that ties together things like ebean ORM, Jetty, Jersey, Jackson, Guice. Dropwizard is the right idea, but is geared towards building REST backends.<p>Any suggestions on a pure Java framework that has critical mass and would fit the bill?
评论 #6924628 未加载
评论 #6926371 未加载
评论 #6926051 未加载
评论 #6926267 未加载
评论 #6931830 未加载
stesch超过 11 年前
I like the benchmark and I appreciate the work that was put into, but Erlang is missing again.<p>If you don&#x27;t even consider Erlang you won&#x27;t miss it. But if you know it has some strengths for this kind of job and you don&#x27;t mind the syntax, you&#x27;d like to see it compared to other solutions.
评论 #6924277 未加载
评论 #6923990 未加载
banachtarski超过 11 年前
None of these numbers are significant! Give me something that tries hundreds if not thousands or tens of thousands of simultaneous requests. Then we have a real benchmark that will probably push a lot of these over the edge in terms of mean latency and especially tail&#x2F;peak latency.
评论 #6925586 未加载
评论 #6925659 未加载
评论 #6929623 未加载
shijie超过 11 年前
This is a fascinating round for WFB, with drastically different results from round 7. I&#x27;m impressed with the strides Go has made, and also quite impressed with JRuby. I know the banking app Simple chose it as its language&#x2F;runtime of choice, and they seem to leverage it well.<p>I&#x27;d still like to see a good showing from Django, maybe using uWSGI + Nginx. I might submit a pull request and see if I can&#x27;t get that included in the next round. Gunicorn is great and incredibly easy to set up, but pales in comparison to other platforms when it comes to raw speed.
评论 #6922897 未加载
riquito超过 11 年前
I&#x27;d love to see how many lines of code each test required, but it&#x27;s probably impossible to do in a fair way<p>edit: I meant in the chart, at a glance
评论 #6922699 未加载
评论 #6922631 未加载
评论 #6922612 未加载
mrinterweb超过 11 年前
I&#x27;m rather surprised to see rack-jruby up as high as it was. I discounted ruby as an option for a very high performance http service, but I guess I&#x27;d be wrong to do that. Don&#x27;t get me wrong, I love ruby and I use it every day. I just didn&#x27;t expect to see it in the top performance contenders list.
评论 #6924083 未加载
desireco42超过 11 年前
What always impresses me and leaves impression, is just how fast raw PHP is. At times it seems PHP has been obsoleted by new platforms, but benchmarks like these make a case for it&#x27;s use. Especially because it is really easy for beginners to pick this up.
评论 #6923746 未加载
neya超过 11 年前
I know benchmarks should be taken with a pinch of salt, but by round 5 I was totally into Scala (Scalatra), trying to write my own framework, so I could get better bang for buck from my EC2 instances, which to be honest, aren&#x27;t cheap when compared to say, Digital Ocean.<p>Around round 6 of these benchmarks, I ditched Scala altogether (and also my framework).The reason I ditched Scala was not because of it&#x27;s performance, etc. But it was because I was the only developer in my company who knew and learnt Scala after reading a couple of books (one was around 800 pages). Obviously, I needed a language that any other developer should have no problem taking over, and Scala developers are 1)expensive 2)not easy to find. Also, Slick (the database interacting code for Scala by Typesafe) wasn&#x27;t mature yet.<p>For this reason, around Round 6, I started writing my own framework in GoLang and used it internally as an &#x27;auxiliary framework&#x27;. I will explain more about this framework soon soon. In my company, we have about a handful of backend programmers and a couple of frontend devs. I found that GoLang was much much easier to teach my programmers, than say I could teach Scala. Please note - Scala is a brilliant functional programming language, but if you are thinking switching from Ruby&#x2F;Python&#x2F;etc would be easy, then you are wrong.<p>Now, we have a workflow that allows us to deliver as quickly as possible, but without missing out on performance - We write our entire V1 in Rails. We implement all the UI&#x2F;frontend related code and then port it to our GoLang framework. We have an internal generator where we just feed our rails app, and the code for our framework is just &#x27;ported&#x27;&#x2F;generated on the fly based on our framework and we just deploy it. So far, our productivity is slightly lost while handling the type conversions, bugs, etc. But it&#x27;s totally worth it. Go outperforms Rails by a huge margin. I noticed that using something like Puma helps a lot, but it still is no way comparable to our GoLang framework.<p>As for our framework, it&#x27;s just pretty simple - Just organize all the files as you would in a Rails application (Models&#x2F;Views&#x2F;Controllers&#x2F;Config) and everything just works without much performance hiccups. We use Gorilla components for stuff like routing and cookies. The rest of the stuff is slightly adapted from other frameworks (like Martini).<p>All in all, I love the ability to have JVM like performance with the productivity of Ruby with a language like GoLang. And this round 8 benchmark is nothing short of impressive. If you haven&#x27;t tried GoLang yet, you should try writing your own framework, not only do you learn about all the trade-offs for the &#x27;magic&#x27; that rails makes under the hood, you also learn about some new stuff and thus become a better programmer.<p>I think GoLang is pretty impressive if someone as average as me can even write a framework like Rails, except for better performance. Give it a try, people, you won&#x27;t be disappointed.
评论 #6924006 未加载
评论 #6923717 未加载
评论 #6923677 未加载
评论 #6923593 未加载
评论 #6923946 未加载
评论 #6924486 未加载
评论 #6925582 未加载
brickcap超过 11 年前
Looks like erlang frameworks are not represented...
评论 #6924265 未加载
pfraze超过 11 年前
Cppsp (top of the i7 charts) is some mad science<p><a href="http://xa.us.to/cppsp/index.cppsp" rel="nofollow">http:&#x2F;&#x2F;xa.us.to&#x2F;cppsp&#x2F;index.cppsp</a>
hit8run超过 11 年前
I started a conversation in #python on freenode and people were a bit outraged by the way frameworks are compared. Some open Database connections and never close them (example: GO) and others open and close DB connections for every request (example: flask). The guys at techempowered should review every pull request and check if it is implemented in a fair way.
optymizer1超过 11 年前
I find the JSON benchmark misleading a bit. I posted this before, but I&#x27;ll say it again: JSON serialization in Go is slow (2.5x slower than Node.js for example [1]). The web server, however, is very fast. When they measure webserver+json, Go wins because of its webserver, not because it serializes JSON faster. If you want to parse a lot of JSON objects with 1 request (or 1 script), or if you have a large JSON object to parse, Node.js will outperform Go.<p>That said, I rewrote my app in Go and I&#x27;m very happy with the performance, stability and testability. The recently announced go &#x27;cover&#x27; tool is very useful and a breeze to use.<p>[1] Here are my benchmarks: <a href="https://docs.google.com/spreadsheet/ccc?key=0AhlslT1P32MzdGREdGl1X0pHWmU0d2xLcHNjbE9Yc0E&amp;usp=drive_web#gid=0" rel="nofollow">https:&#x2F;&#x2F;docs.google.com&#x2F;spreadsheet&#x2F;ccc?key=0AhlslT1P32MzdGR...</a> (includes codepad.org links to the source for each benchmark)
评论 #6928130 未加载
mmucklo超过 11 年前
Regarding symfony2 at the bottom - I submitted a simple pull request to try and fix some issues with the setup, but it&#x27;s been sitting and sitting there...<p><a href="https://github.com/TechEmpower/FrameworkBenchmarks/pull/650" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TechEmpower&#x2F;FrameworkBenchmarks&#x2F;pull&#x2F;650</a>
评论 #6922668 未加载
rartichoke超过 11 年前
Benchmarks are fun but I&#x27;ll stick with rails and its simple ways of letting you cache data.<p>I&#x27;m ok with getting out the door response times of 8-15ms while serving 20,000 unique hits a day on a $5&#x2F;month VPS. The server does not even break a sweat too and it&#x27;s doing more than serving the app too.
评论 #6925085 未加载
WoodenChair超过 11 年前
It&#x27;s amazing how well a young language like Dart and its frameworks performs in the multi-query benchmarks. There&#x27;s still so much more optimization to go; at this stage it feels optimistically like the sky is the limit!
saltvedt超过 11 年前
Whats up with the number of Rails errors?
bsaul超过 11 年前
Anybody could explain what gemini is ? I&#x27;ve been on the eclipse project home, and i really don&#x27;t see the link with a web framework benchmark.
评论 #6924196 未加载
评论 #6924253 未加载
评论 #6924239 未加载
liquidcool超过 11 年前
Am I the only one shocked to see Grails beat Spring? I mean, I think it&#x27;s awesome, but part of me wonders if something went awry in the Spring code. I know a last minute (breaking) change kept Grails out of Round 7, so perhaps whatever that was made a big impact.
评论 #6931577 未加载
atonse超过 11 年前
Interesting to see go moving up there.<p>Curious - any reason why you guys don&#x27;t have ASP.NET tests in Windows with SQL Server? I fiddled with the filters and found none.<p>Update: Never mind. I see it now. You don&#x27;t have Windows tests on EC2.
评论 #6922643 未加载
Horusiath超过 11 年前
I&#x27;m curious why ServiceStack.net has fall out so badly, since their own benchmarks shows a lot higher performance than ASP.NET web applications.
nikentic超过 11 年前
I cannot find Flask in the list. Any specific reason?
评论 #6922646 未加载
评论 #6922651 未加载
评论 #6922655 未加载
riffraff超过 11 年前
dumb question: are we sure these things are doing the same thing?<p>AFAICT some of the larger frameworks by default do a bunch of stuff (csrf and ip spoof checks, session management, etag generation based on content etc) that simpler solutions don&#x27;t, but this things can usually be turned off.
评论 #6925642 未加载
评论 #6925366 未加载
lazyshit超过 11 年前
I&#x27;m curious as to why Finagle has 0&#x27;s across the board for everything.
anilmujagic超过 11 年前
I&#x27;m really surprised with ASP.NET&#x2F;C# results :-S
评论 #6923821 未加载
评论 #6923767 未加载
评论 #6928438 未加载
agnsaft超过 11 年前
Why is Python doing so much worse than PHP?
guotie超过 11 年前
which version of go is used?
评论 #6925485 未加载
veto64超过 11 年前
i&#x27;m interested in who is financing this benchmarks. really sorry, but for me it looks like a new way of doing seo marketing
评论 #6928265 未加载