News for hackers. Stuff that matters.
Re:Making the obvious code fast (2016) by gameswithgo on Wednesday April 17, 2019 @02:16PM (#19685052)
Rust managed to make some of these high level abstractions compile to fast machine code almost every time. Its quite refreshing to go from Linq/Streams etc to Rust iterators.

So does C++ iterators for that matter but they are not so pleasant to actually write.

Re:Making the obvious code fast (2016) by barrkel on Wednesday April 17, 2019 @03:03PM (#19685443)
It's true. Rust's approach to passing lambdas to iterators usually gives the compiler good info to inline. Some of my exercise programs when learning Rust exceeded fairly straightforward C implementation too, possibly due to stronger guarantees around aliasing.