Re:Getting Past C
by dbaupp on Tuesday January 03, 2017 @05:31PM
(#13313811)
As others have said, this is a fairly standard optimisation: compilers (Rust, C, C++, Java, PHP, whatever) will remove branches if they can see that it can never be taken. Iterators are slightly different in that they don't have any indexing checks at all: an array iterator yields a plain reference, and these are always dereferenced like plain pointers.
[ Parent
| on HN ]
There are no comments on this comment yet.