3 ms·
So would const generics for arrays make map/fold somewhat faster because there would be no need to create an iterator?
by jadbox 6y ago
So would const generics for arrays make map/fold somewhat faster because there would be no need to create an iterator?
- steveklabnik 6y agoYou would still need to create an iterator, because there are three different ways to iterate, and you have to pick which one you want. However, often times it entirely compiles away to nothing. What this may help with is bounds checks; it is possible for this to make it easier to remove/hoist bounds checks in some circumstances. In my understanding.