Re:Plan to throw one away
by amelius on Tuesday December 15, 2015 @06:43AM
(#10737220)
Parsing JavaScript efficiently is not the problem. Much more difficult is writing the garbage collector. Especially a concurrent one.
[ Parent
| on HN ]
Re:Plan to throw one away
by munificent on Tuesday December 15, 2015 @12:33PM
(#10739054)
> Much more difficult is writing the garbage collector. Especially a concurrent one.
Since JS is single-threaded, you can write a simple stop-the-world mark-sweep collector as a first iteration. (Simple reference counting probably isn't a good idea since cycles are common in JS.) Then you can move to incremental and/or generational if that's giving you annoying hitches. Only after that do you need to put concurrent on the table.
I believe even world class JS engines have only relatively recently started doing GC in another thread.