Explore >> Select a destination


You are here

azdavis.net
| | recursion.wtf
4.7 parsecs away

Travel
| | This is a post about writing elegant and performant recursive algorithms in Rust. It makes heavy use of a pattern from Haskell called recursion schemes, but you don't need to know anything about that; it's just an implementation detail. Instead, as motivation, I have benchmarks showing a 14-34% improvement over the typical boxed pointer representation of recursive data structures in Rust.
| | rauljordan.com
7.8 parsecs away

Travel
| |
| | hurryabit.github.io
3.5 parsecs away

Travel
| | I demonstrate how to (ab)use generators to transform any recursive function into an iterative one with nearly zero code changes.
| | tmandry.gitlab.io
28.8 parsecs away

Travel
| For just about as long as I've been working on async Rust, the topic of scoped tasks has come up. These areasync tasks that borrow from their environment, and they would come in handy in a lot of situations. Last year the standard library stabilized thread::scope which allows synchronous threads to do this. You could imagine a similar API, but with async: asyncfn fanout(data: &Vec){task::scope(|s|{// Spawn subtasks to run in parallel.