I looked into if iterators are really zero overhead in @rustlang it sounded like a dubious claim to be honest, turns out that all my tests say they are! I’m impressed. Interesting side discovery a loop over a vector is significantly slower then over the vector as slice!
-
Show this thread
-
Replying to @heinz_gies @rustlang
The bounds-checks can't get optimized away on Vectors because they size can change?
1 reply 0 retweets 1 like -
I don’t think so. It’s odd however. for x in vec {…} is significantly slower then for x in &vec {…} (vec is always a vector with the same data)
4 replies 0 retweets 1 like
Replying to @heinz_gies @saarw
They have different semantics. What’s in the vector?
1:17 PM - 25 Apr 2019
0 replies
0 retweets
3 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.