maarten van damme:
it's odd that the resulting arraylist is slower to access at runtime then the arraylist generated at runtime... Is there a reason for this?
In such cases, beside thinking some time about the topic, one solution is to take a look at the asm.
Maybe it's the same problem as with enum arrays, they get copied like literals every time you use them.
Should I open bugreports for your testcases?
I think the secondo program, that just calls array(), doesn't show a problem that's meant to be fixed.
Regarding the first with filter, I think it's a known temporary limitation of CTFE (caused by nested lambdas). I am not sure because DMD used to give a more specific error message for this limitation.
So I think they don't need to be reported. Bye, bearophile
