How to loop through characters of a string in D language?

forkit forkit at gmail.com
Wed Dec 8 23:18:55 UTC 2021


On Wednesday, 8 December 2021 at 22:55:02 UTC, forkit wrote:
> On Wednesday, 8 December 2021 at 22:35:35 UTC, Stanislav Blinov 
> wrote:
>>
>> You're passing a literal. Try passing a runtime value (e.g. a 
>> command line argument). Also, -O2 -release :) Uless, of 
>> course, your goal is to look at debug code.
>
> but this will change nothing.
>
> the compilation cost of using .replace, will always be apparent 
> (compared to the presented alternative), both in less time 
> taken to compile, and smaller size of executable.

well... maybe not that apparent afterall ;-)

.. the mysteries of compiler optimisation ....


More information about the Digitalmars-d-learn mailing list