Re: foreach vs static foreach on compile time tuples

2025-08-27 Thread monkyyy via Digitalmars-d-learn
On Wednesday, 27 August 2025 at 10:29:20 UTC, Steven Schveighoffer wrote: Static foreach vs foreach on the same ct sequence should be equal performance. All alias foreach's must be on an aliasSeq that must exist, *thats a downside* Op didnt seem to be thinking about ct bigO so presumably m

Re: foreach vs static foreach on compile time tuples

2025-08-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On Tuesday, 26 August 2025 at 18:48:47 UTC, monkyyy wrote: ```d #!opend -unittest -main -run app.d bool isEvenImpl(int I)()=>! I%2; enum cases=1; import std.range; bool isEven(int i){ switch(i){ static foreach(I;0..cases){ //foreach(I;enumlist!(iota(cas