3 ms·
I get that, but my question is: if a type is mutable and I instantiate with const, will the exact same optimizations available?
by t6jvcereio 4y ago
I get that, but my question is: if a type is mutable and I instantiate with const, will the exact same optimizations available?
- adgjlsfhk1 4y agothis isn't about instantiating a struct, this is about specifying that the field of a struct is const.
- t6jvcereio 4y agoOh fields. Got it.
- ChrisRackauckas 4y agoA mutable struct which labels all fields as const is an immutable struct. And yes it optimizes.