Closed
Description
The example is from hashmap, where a bucket is: struct Bucket<K,V> { hash: uint, key: K, value: V }
and the hashmap keeps a vector of ~[Option<Bucket<K,V>>]
If this were a custom enum, the non-nullable pointer optimization could be used to eliminate the enum tag overhead if either K
or V
were such a non-nullable type.
Extend the optimization to handle a case like Option<Bucket>
when possible.
Manual cusom enum was implemented in PR #9212 (not merged).
Metadata
Metadata
Assignees
Labels
No labels