by vgallur on 12/13/17, 4:22 PM with 54 comments
by jwlake on 12/13/17, 5:32 PM
for (var i = 0; i < n; i++) { sha256(data); }
He should be using crypto and the async versions. This benchmark actually is just measuring the speed of your sha256 implementation, which I would guess is equal on all 4 platforms if you actually do them correctly.by glitcher on 12/13/17, 6:09 PM
I can't tell when this was written, am I missing something?
by ninkendo on 12/13/17, 5:30 PM
by exabrial on 12/13/17, 5:36 PM
Tomcat uses acceptors threads and a request executor pool. And, if available on your platform (which it probably is), it defaults to using non-blocking IO instead of polling.
EDIT: It looks like he does acknowledge the executor threads are pooled. His main criticism is that "too many blocked threads are bad for a scheduler". But if Tomcat is using the NIO connector this doesn't apply, because your executor threads won't block on IO. And typically the pool size is limited to something manageable by a modern CPU (200 or so)
by pjmlp on 12/13/17, 6:05 PM
by TheDong on 12/13/17, 5:03 PM
Java: Requires callbacks
nodejs: Requires Callbacks
node has 'await', but there are other options as well than just plan callback hell.Java has pretty much whatever you want. Akka, futures/promises, etc.
by flavio81 on 12/13/17, 6:28 PM
Yes, it shows...
by mtgx on 12/13/17, 5:39 PM
by dingdingdang on 12/13/17, 7:06 PM
by dullgiulio on 12/13/17, 5:06 PM
How does that work? AFAIK Linux, unlike windows, doesn't have a proper async API for filesystem I/O.
POSIX AIO is implemented using threads in libc and Linux AIO (io_submit, etc) only works with O_DIRECT (no kernel caching) and there are other issues depending on underlying filesystem driver.
Is there any solution?
by ruffrey on 12/13/17, 6:43 PM
by frugalmail on 12/13/17, 6:42 PM
by politelemon on 12/13/17, 6:49 PM
https://www.nearform.com/blog/node-js-is-getting-a-new-v8-wi...
by haglin on 12/18/17, 6:22 AM
"Most Java web servers work by starting a new thread of execution for each request that comes in "
Nobody who has a performance critical application starts a new thread for every request.
That would be beyond stupid.
by Neil44 on 12/13/17, 7:31 PM
by bullen on 12/13/17, 9:11 PM
by callesgg on 12/13/17, 5:02 PM
It is the only thing that matters line for line.