Sometimes 100 lines of code can fix your ctfe perf

Per Nordlöw per.nordlow at gmail.com
Tue Aug 24 16:16:50 UTC 2021


On Tuesday, 24 August 2021 at 14:07:45 UTC, Stefan Koch wrote:
> Good Morning,

Would it be motivated to have the compiler deduce that `result ~= 
"whatever"` can be lowered to a reallocating append because 
`result` isn't aliased:

```d
enum x = () { string result;
foreach(_; 0 ..n_iterations)
   result ~= "whatever"
return result; } ()
```



More information about the Digitalmars-d mailing list