dmd optimizer now converted to D!

Ivan Kazmenko gassa at mail.ru
Thu Jul 5 19:02:22 UTC 2018


On Thursday, 5 July 2018 at 14:30:05 UTC, Dukc wrote:
> foreach(j, ref piece; cast(int[4][]) a)
> {   auto pieceI = j * 4;
>     static foreach(i; 0 .. piece.length) piece[i] = pieceI + i;
> }
>
> Can probably be made even better by designing some template 
> helper.

Thanks!  The cast to an array of int[4]s is just hilarious.



More information about the Digitalmars-d mailing list