dmd optimizer now converted to D!
Dukc
ajieskola at gmail.com
Thu Jul 5 14:30:05 UTC 2018
On Thursday, 5 July 2018 at 12:50:18 UTC, Ivan Kazmenko wrote:
> Is there any better way? To prevent introducing bugs when
> micro-optimizing, I'd like the loop body to remain as unchanged
> as it can be.
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.
More information about the Digitalmars-d
mailing list