Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single entry slot map #1784

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

aardvark179
Copy link
Contributor

@aardvark179 aardvark179 commented Dec 30, 2024

Single entry slot map

This is a stacked PR on top of

This introduces a single-entry slot map to take the common case of a single property from:

graph LR
Object["ScriptableObject"]
Map["SlotMap"]
Array["Slot[]"]
Slot1["Slot"]
Object1["ScriptableObject"]
Map1["SlotMap"]
Array1["Slot[]"]
Slot2["Slot"]
Object --> Map --> Array
Array --> Slot1
Object1 --> Map1 --> Array1
Array1 --> Slot2
Loading

to:

graph LR
Object["ScriptableObject"]
Map["SingleEntrySlotMap"]
Slot1["Slot"]
Object1["ScriptableObject"]
Map1["SingleEntrySlotMap"]
Slot2["Slot"]
Object --> Map --> Slot1
Object1 --> Map1 --> Slot2
Loading

This saves 48 bytes on any object with a single slot.

@aardvark179 aardvark179 force-pushed the aardvark179-add-single-entry-slot-map branch from 477fa19 to 088d6ab Compare January 9, 2025 20:13
@aardvark179
Copy link
Contributor Author

Rebased after merge of #1782.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant