r/WatchPeopleCode • u/SerenityOS • May 27 '21
[C++, JavaScript engine] Improving allocation performance in the SerenityOS JavaScript engine by recycling GC heap blocks
https://www.youtube.com/watch?v=x9xLOuMK9wo
26
Upvotes
r/WatchPeopleCode • u/SerenityOS • May 27 '21
3
u/Leifbron May 28 '21
Sometimes I look at these vids and I think, "Damn, maybe I shouldn't be in CS". The GTAV load screen optimization guy just used a script hook for the strlen call, so that's fairly easy(still hugely difficult), but this dude actually goes into the JS engine (V8 or not idk) and straight up writes the patch. No workaround jankiness.
Though I bet browsers won't do this because they already have a reputation for hogging memory, and keeping blocks around in hopes they get recycled is a bit strange.