4 ms·
All heap access must be synchronized. Using pooled buffers may actually be faster because you can ensure that only one thread is accessing a specific pool. Just
by cmbaus 13y ago
All heap access must be synchronized. Using pooled buffers may actually be faster because you can ensure that only one thread is accessing a specific pool. Just create a new pool, when a new thread is created.
- thirsteh 13y agoOr, you know, each thread could allocate only when it needs something and handle its own recycling. Node.js has a particular advantage in that it isn't concurrent in any way (which, of course, has many other downsides.)
- bad_user 13y agoYou can certainly build concurrent systems on top of Node, what it doesn't have is preemptive multi-threading, which sucks IMHO, but speaking of Go I also don't like that it does M:N multi-threading instead of 1:1 like the JVM, as the scheduling done is suboptimal.
- GhotiFish 13y agoOh man, I'm pretty keen to write many types of subsystems, but thread scheduling? I'll take stuff I don't want to mess with for 300, Alex.
- thirsteh 13y ago> You can certainly build concurrent systems on top of Node You sound so confident. Do you have any example of a system in JavaScript that has concurrent semantics?