forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add size-bucketed free list to Hades
Summary: Previously, Hades used a "first-fit" free list algorithm for OG. Its performance suffered on any benchmarks doing a lot of allocations that survived until old gen (such as many Octane benchmarks). Instead, use buckets of free lists for each size class from 8 to 2048 (in multiples of 8), and one general free list that can be split for anything larger than that. After a segment has the first free'd object, it transitions from bump-alloc mode to free-list mode, and populates the buckets. This free list pattern still doesn't do any work towards implementing coalescing; instead, I'm going to put up a later diff for implementing compaction of particularly fragmented segments. That means for now, the heap can become very fragmented. Perf wins on Octane benchmarks like Typescript are in the 10x range, but some others are unaffected. Reviewed By: davedets Differential Revision: D21460843 fbshipit-source-id: 132aa700428089bb60f6a6273213fa73c4d81a1d
- Loading branch information
1 parent
dea85c3
commit 467d5d1
Showing
3 changed files
with
248 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.