Bug 238115 - Reduce size of CodeBlock and UnlinkedCodeBlock.
Summary: Reduce size of CodeBlock and UnlinkedCodeBlock.
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-19 12:50 PDT by Mark Lam
Modified: 2022-04-01 22:27 PDT (History)
13 users (show)

See Also:


Attachments
proposed patch. (82.99 KB, patch)
2022-03-19 12:57 PDT, Mark Lam
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2022-03-19 12:50:42 PDT
Introduce a PackedFixedVector and PackedUniquePtr and use them in CodeBlock and UnlinkedCodeBlock.

This reduces the size of the CodeBlock from 248 to 240 i.e. drops from 16 atoms (rounded up from 15.5) to 15 atoms.
This reduces the size of the UnlinkedCodeBlock from 216 to 192 i.e. drops from 14 atoms (rounded up from 13.5) to 12 atoms.
Comment 1 Mark Lam 2022-03-19 12:57:54 PDT
Created attachment 455170 [details]
proposed patch.

Let's get some EWS testing.
Comment 2 Mark Lam 2022-03-23 17:57:36 PDT
The current proposal using Packed pointers appear to have a perf regression.  Going to try using a ButterflyFixedVector instead (on Yusuke's suggestion).
Comment 3 Radar WebKit Bug Importer 2022-03-26 12:51:15 PDT
<rdar://problem/90880721>