Divide & Conquer divides, but doesn't conquer
Adam D. Ruppe
destructionator at gmail.com
Mon May 25 16:15:30 UTC 2020
On Monday, 25 May 2020 at 16:04:24 UTC, Andrei Alexandrescu wrote:
> static foreach is quadratic? Is this a matter of principle, or
> QoI?
I have a hard time seeing why it HAS to be this way. Regular
tuple foreach is better in most cases, string mixins are better
in most cases (if written with appropriate care).
There might be some cases where it is fundamental - I just
honestly don't know - and it is possible automatically
differentiating those cases is impossible and/or more trouble
than it is worth, but I continue to believe our primary problem
is the implementation right now.
The problem is idk what the fix is. I spent a couple hours
looking at the code a couple weeks ago and didn't find a
solution. But that doesn't mean there isn't one.
More information about the Digitalmars-d
mailing list