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.

Node.js and io.js – Very different in performance

171 pointsby mschoebelover 10 years ago

8 comments

bnoordhuisover 10 years ago
Interesting results, thanks for sharing. I can perhaps shed some light on the performance differences.<p>&gt; Buffer 4.259 5.006<p>In v0.10, buffers are sliced off from big chunks of pre-allocated memory. It makes allocating buffers a little cheaper but because each buffer maintains a back pointer to the backing memory, that memory isn&#x27;t reclaimed until the last buffer is garbage collected.<p>Buffers in node.js v0.11 and io.js v1.x instead own their memory. It reduces peak memory (because memory is no longer allocated in big chunks) and removes a whole class of accidental memory leaks.<p>That said, the fact that it&#x27;s sometimes slower is definitely something to look into.<p>&gt; Typed-Array 4.944 11.555<p>Typed arrays in v0.10 are a homegrown and non-conforming implementation.<p>Node.js v0.11 and io.js v1.x use V8&#x27;s native typed arrays, which are indeed slower at this point. I know the V8 people are working on them, it&#x27;s probably just a matter of time - although more eyeballs certainly won&#x27;t hurt.<p>&gt; Regular Array 40.416 7.359<p>Full credit goes to the V8 team for that one. :-)
评论 #8912003 未加载
评论 #8911860 未加载
评论 #8911646 未加载
评论 #8915711 未加载
评论 #8915714 未加载
评论 #8912336 未加载
评论 #8911827 未加载
exploriginover 10 years ago
There are two very good comments at the bottom of the article. Here for your consumption:<p>Author: (Unknown) 2015-01-19 12:54 UTC<p>io.js based on node v0.11, so you need compare<p>- v0.10 (nodejs)- v0.11 (nodejs) - v0.11 (nodejs)- v1.0 (iojs)<p>Author: Michael Schöbel 2015-01-19 13:01 UTC<p>I also downloaded sources and compiled the latest master branch of Node yesterday evening. Performance was within 2% of io.js for all three tests.<p>But most people won&#x27;t compile themselves. Most will use the latest stable release.
评论 #8912484 未加载
cdnsteveover 10 years ago
Reporting benchmark results on a single OS, on a single CPU type isn&#x27;t really benchmarking. It&#x27;s an isolated case of results.<p>I&#x27;d recommend to perform an accurate suite of performance tests, use different OS (CoreOS, Ubuntu) that are actually used in server environments. Also different machine hardware will play a role.<p>There&#x27;s not enough data at this point to come to any conclusion at this point imo.<p>This result set is like saying that 95% of the people on the web use the safari browser on the Apple website.
评论 #8921371 未加载
Kiroover 10 years ago
&gt; This can be extremely important if you have a project with heavy CPU-use<p>Would you recommend using something different than JavaScript when writing CPU heavy apps? I was under the impression that it&#x27;s better suited when dealing with high I&#x2F;O.
评论 #8911942 未加载
评论 #8911689 未加载
评论 #8911848 未加载
评论 #8911608 未加载
评论 #8911601 未加载
评论 #8911653 未加载
评论 #8911617 未加载
SixSigmaover 10 years ago
On a slight tangent, there&#x27;s an article using the Sieve of Eratosthenes demonstrating the use of Communicating Sequential Threads (CSP) on Russ Cox&#x27; website (one of the developers of Go)<p><a href="http://swtch.com/~rsc/thread/" rel="nofollow">http:&#x2F;&#x2F;swtch.com&#x2F;~rsc&#x2F;thread&#x2F;</a>
wolframhempelover 10 years ago
These are very interesting findings. On a higher level though: Are there any significant performance differences between the APIs of node and io? E.g. tcp package processing, file system access etc? I know that a lot of them are effectively C, so independent of the V8 version.
richmarrover 10 years ago
&gt; Depending on what your Node application does, my &gt; findings may or may not apply to your use-case.<p>I&#x27;m going to go out on a limb and say that the proportion of real world Node apps that will be noticably affected by this is less than 1%
daphneokeefeover 10 years ago
The competition between these teams is going to make both of them better. They will not only be competing on speed, but also on features. A huge win for developers.