summaryrefslogtreecommitdiff
path: root/include/ruby/encoding.h
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2022-11-21 20:50:53 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2022-11-23 18:00:12 -0500
commitd92054e3711ca5dd336b753c238f4e53a9881157 (patch)
tree7abdb46cbb1343d52ce4c655695118d6034f107e /include/ruby/encoding.h
parente788215125a015d32281aff0a7891d2d2020dbcb (diff)
YJIT: Use a Box for branch targets to save memory
We frequently make branches that only have one target but we used to always allocate space for two branch targets. This patch moves all the information a branch target has into a struct and refer to them using Option<Box<BranchTarget>>, this way when the second branch target is not present it only takes 8 bytes. Retained heap size on railsbench went from 16.17 MiB to 14.57 MiB, a ratio of about 1.1.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6799
Diffstat (limited to 'include/ruby/encoding.h')
0 files changed, 0 insertions, 0 deletions