News for hackers. Stuff that matters.
Re:“The 'use asm' pragma is not necessary to opt into optimi... by mccr8 on Tuesday October 15, 2013 @02:41PM (#6555395)
asm.js does not turn off garbage collection. Instead, programs written in this style do not allocate many objects, so the garbage collector does not need to run much. asm.js programs allocate a single giant block of memory, and then do their own psuedo-manual-memory-management within that block.
Re:“The 'use asm' pragma is not necessary to opt into optimi... by mistercow on Tuesday October 15, 2013 @03:10PM (#6555618)
From the asmjs.org FAQ:

>Q. Why not just keep optimizing JavaScript JIT compilers instead?

>A. No need to stop! But JIT compilers have less predictable performance based on complicated heuristics. The asm.js model provides a model closer to C/C++ by eliminating dynamic type guards, boxed values, and garbage collection.

Re:“The 'use asm' pragma is not necessary to opt into optimi... by Timmmmbob on Tuesday October 15, 2013 @03:45PM (#6555845)
He's saying it eliminates garbage collection by emitting code that doesn't dynamically allocate any objects. The GC is still active it just never needs to do anything. If you remove the 'use asm' pragma the code will still not allocate any objects and hence the GC will still never need to do anything.
Re:“The 'use asm' pragma is not necessary to opt into optimi... by mistercow on Wednesday October 16, 2013 @10:09PM (#6563299)
Ah, I see what you're saying. The point being that you still have the GC for any non-asm.js code on the same page. And I suppose by the same token, you could "opt out" of GC without asm.js by using various techniques to eliminate allocations.