You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have something like the following. Min sizes assume empty storage, averages are a best guess of the common case:
// We count the data behind Arcs as free because we have to store that information anyway// Ignoring string: 24 local, 56ish remote// String: 24 local, about 64 remotetypeWordList = HashMap<String,Vec<Meta>>;// 40 localpubstructMeta{stem:Arc<str>,// 16 localsource:Source,// 24 local}// 24 localpubenumSource{Affix(Arc<AfxRule>,usize),// 16, 32 pointeeDict(Box[Arc<MorphInfo>]>),// 16 local, 24 pointeePersonal(Box<PersonalMeta>),// 8 local, 40 pointeeRaw,}// 40 local, extra meta in personal is uncommonpubstructPersonalMeta{friend:Option<Arc<str>>,// 16 localmorph:Vec<Arc<MorphInfo>>,// 24 local}// 24 local, ~8 pointeepubenumMorphInfo{Stem(MorphStr),/* ... */}// 32 localpubstructAfxRule{kind:RuleType,can_combine:bool,patterns:Vec<AfxRulePattern>,}// 88 localpubstructAfxRulePattern{affix:Box<str>,condition:Option<ReWrapper>,strip:Option<Arc<str>>,morph_info:Vec<Arc<MorphInfo>>,}
That's really not terrible at ~80 bytes per entry for meta but I think we can simplify things, even outside of the storage reasons.
This would mean more entries in a single vector rather than multiple entries in multiple vectors, and that's probably a good thing for various reasons. Having a flat structure rather than nested will probably make the CPU a bit happier too.
I would like to valgrind this all before actually doing the change, to get a good idea of how much we save.
The text was updated successfully, but these errors were encountered:
Currently we have something like the following. Min sizes assume empty storage, averages are a best guess of the common case:
That's really not terrible at ~80 bytes per entry for meta but I think we can simplify things, even outside of the storage reasons.
This would mean more entries in a single vector rather than multiple entries in multiple vectors, and that's probably a good thing for various reasons. Having a flat structure rather than nested will probably make the CPU a bit happier too.
I would like to valgrind this all before actually doing the change, to get a good idea of how much we save.
The text was updated successfully, but these errors were encountered: