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
The current method for setting stack arena size via the SG_MAX_STACK_ELEMS environment variable has the advantage of keeping APIs compatible with BTreeMap/BTreeSet. For example, a new map can be declared in the usual way:
let map:SGMap<usize,usize> = SGMap::new();assert_eq!(map.capacity(), 1024);// Assuming `SG_MAX_STACK_ELEMS == 1024` (default)
But this has the disadvantage of being a fixed, global setting. It'd be awesome if we could additionally support the array-style type declaration syntax used by crates like smallvec and tinyvec. This would allow unique stack arena sizes for each callsite, like so:
Making this change will require a little refactoring, the types in src/tree/types.rs would likely have to become associated with the SGTree struct instead of being global?
The text was updated successfully, but these errors were encountered:
The current method for setting stack arena size via the
SG_MAX_STACK_ELEMS
environment variable has the advantage of keeping APIs compatible withBTreeMap
/BTreeSet
. For example, a new map can be declared in the usual way:But this has the disadvantage of being a fixed, global setting. It'd be awesome if we could additionally support the array-style type declaration syntax used by crates like
smallvec
andtinyvec
. This would allow unique stack arena sizes for each callsite, like so:Making this change will require a little refactoring, the types in
src/tree/types.rs
would likely have to become associated with theSGTree
struct instead of being global?The text was updated successfully, but these errors were encountered: