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

Rework on data structure #94

Open
MiSawa opened this issue Feb 28, 2022 · 0 comments
Open

Rework on data structure #94

MiSawa opened this issue Feb 28, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@MiSawa
Copy link
Owner

MiSawa commented Feb 28, 2022

About objects, I guess that

  • 20% of objects are not read (just deserialized from input, and discarded by the query),
  • 75% of objects are not indexed (deserialized from input and serialized to output, but not examined),
  • 4.9% of objects are not modified (indexed like .key doesn't have modifications like |=), and
  • only 0.1% of objects are actually modified.

If my guess was right, it'd probably make sense to use copy-on-write array-map (i.e. Vec<(Key, Value)>) (+ perhaps lazily create Trie<Key, EntryIndex>). Or maybe persistent version of Vec and Trie instead. Maybe Vec<Option<(Key, Value)>> to support fast deletion.

@MiSawa MiSawa added the enhancement New feature or request label Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant