julia
julia copied to clipboard
optimizer: inline constant `String` return value
The purpose of is_inlineable_constant
is to avoid code size increases
from copying objects too much. String
s would be fine since they are
generally copied around by reference only.
should this only happen for short string?
I think String
are (always?) copied by reference whatever size it has. Is this understanding correct, @Keno or @vtjnash ?
That's the theory of it, but we should make sure that when we're compressing or serializing IR, we don't accidentally copy the strings around.