Preprocessor for loop #3974
Unanswered
mosel00
asked this question in
Language Ideas
Replies: 2 comments 11 replies
-
How about doing this with source-generators? |
Beta Was this translation helpful? Give feedback.
10 replies
-
This kind of optimization is something I'd expect the compiler and/or JIT runtime to do automatically where appropriate. I don't think the language needs to be made significantly more complex just to handle an infrastructure scenario that could be handled automatically. Having the runtime take care of it would also provide much wider benefit. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be practical to have a code generating for loop. E.g.
would generate
and
would generate
I don't know what syntax it should have, but it would be nice to have it for e.g. vectors or matrices, where you have a bunch of similar operations, that should be as fast as possible, but multiple types, that only differ in the amount of fields.
Beta Was this translation helpful? Give feedback.
All reactions