News for hackers. Stuff that matters.
Re:Recycling memory buffers in Go by thirsteh on Monday August 26, 2013 @07:55PM (#6280649)
Using a shared buffer list isn't very efficient in a language with concurrency since you have to synchronize to take from/add to the list.
Re:Recycling memory buffers in Go by cmbaus on Tuesday August 27, 2013 @12:17AM (#6281414)
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.
Re:Recycling memory buffers in Go by thirsteh on Tuesday August 27, 2013 @12:20AM (#6281421)
Or, 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.)
Re:Recycling memory buffers in Go by bad_user on Tuesday August 27, 2013 @06:16AM (#6282526)
You 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.
Re:Recycling memory buffers in Go by GhotiFish on Tuesday August 27, 2013 @09:10AM (#6283160)
Oh 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.

Re:Recycling memory buffers in Go by thirsteh on Tuesday August 27, 2013 @11:00AM (#6283812)
> 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?