3 ms·
What a nested rust iterator is doing, semantically, is creating a struct containing a struct containing a struct... that calls a method that calls a method that
by mastax 4y ago
What a nested rust iterator is doing, semantically, is creating a struct containing a struct containing a struct... that calls a method that calls a method that calls a method. The compiler has to do a lot of work to make that into anything approaching a C for loop. Just try running unoptimized rust code and you'll see.