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

icons: use a compact array #1436

Merged
merged 2 commits into from
Jul 24, 2022
Merged

icons: use a compact array #1436

merged 2 commits into from
Jul 24, 2022

Conversation

N-R-K
Copy link
Collaborator

@N-R-K N-R-K commented Jul 24, 2022

a lot of the extension use the same icon. this can be exploited via
having an array with all the unique icons and then storing a single byte
index into the unique array.

when using O_EMOJI this results in around ~1.7KiB drop in the total
table size. O_NERD and O_ICONS get roughly ~0.5KiB savings.

a lot of the extension use the same icon. this can be exploited via
having an array with all the unique icons and then storing a single byte
index into the unique array.

when using `O_EMOJI` this results in around ~1.7KiB drop in the total
table size. `O_NERD` and `O_ICONS` get roughly ~0.5KiB savings.
@N-R-K
Copy link
Collaborator Author

N-R-K commented Jul 24, 2022

Btw, on master I don't see any drop in binary size. But on my local branch (where I use additional compiler optimizations) I see some binary size drop as well.

@jarun jarun merged commit f829afe into jarun:master Jul 24, 2022
@jarun
Copy link
Owner

jarun commented Jul 24, 2022

👍

@N-R-K N-R-K deleted the icon_compaction branch July 24, 2022 10:51
@N-R-K N-R-K restored the icon_compaction branch July 24, 2022 10:55
@N-R-K N-R-K deleted the icon_compaction branch July 24, 2022 10:55
@N-R-K N-R-K mentioned this pull request Jul 24, 2022
6 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants