r/WatchPeopleCode • • 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

4 comments sorted by

View all comments

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.

4

u/Disaster_Expert May 28 '21

Well, he was the one who wrote the browser as well.