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

ListProduct simplified #96

Merged
merged 2 commits into from
Apr 8, 2024
Merged

ListProduct simplified #96

merged 2 commits into from
Apr 8, 2024

Conversation

maciejhirsz
Copy link
Owner

This PR is reverting ListProduct storage to Vec<Box<_>> from PageList (see https://maciej.codes/2023-04-28-optimizing-kobold.html).

I managed to keep this implementation relatively light on Wasm size compared to my initial one. To implement keyed lists and finally getting Kobold up on the js-framework-benchmark the individual list items need to have their own stable pointers. Even though this might introduce some memory fragmentation, it should also improve things slightly since iteration over the list cannot be simpler.

There is also some room for optimization for "flat" array-backed lists that are bounded to some const N: usize length.

@maciejhirsz maciejhirsz merged commit 70db885 into master Apr 8, 2024
4 checks passed
@maciejhirsz maciejhirsz deleted the list-rewrite branch April 8, 2024 22:47
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