Ah, good point! I forgot about the double allocation from Memory. It seems like the allocation is avoided due to constant folding, so for example
julia> five() = MaybeBig{Int}(5)
five (generic function with 1 method)
julia> @btime five()
0.894 ns (0 allocations: 0 bytes)
MaybeBig{Int64}(5, #undef)
doesn’t allocate either. It is still unclear to me if the allocation could be avoided in the general case, or if it relies upon the value being preallocated by the compiler. But at least the situation is better than I thought!