Closed
Description
A somewhat common code pattern is []byte(string1 + string2)
.
Today this gets compiled as two separate steps: concatenating the two strings into a new string, and then copying that string result into a new []byte slice.
But it shouldn't be too much trouble to have the compiler instead recognize these patterns (e.g., recognize an OSTR2BYTES whose operand is an OADDSTR), and optimize accordingly.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done