May 25, 2014 [Issue 12798] New: constant folding should optimize subsequent concatenations | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12798 Issue ID: 12798 Summary: constant folding should optimize subsequent concatenations Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: performance Severity: major Priority: P1 Component: DMD Assignee: nobody@puremagic.com Reporter: k.hara.pg@gmail.com This is front-end optimizer issue. Preceding concatenations of string literals will be optimized to one long literal. string x; string y = "a" ~ "b" ~ x; // optimized to "ab" ~ x But subsequent one doesn't. string z = x ~ "a" ~ "b"; // not optimized to x ~ "ab" -- |
Copyright © 1999-2021 by the D Language Foundation