I recently came across the ‘Four solutions to a Trivial Problem’ talk by Guy L. Steele.
It talks about different styles of programming to solve a problem, with the important conclusion mostly being that when you write a high-level ‘divide and conquer’ approach to solve a problem, the compiler can decide to optimize it for sequential or parallel computing (or a blend thereof).
A simple example would be to say ‘I want to sum this list of numbers’, without specifying how, meaning that the compiler can decide whether to perform a sequential accumulation (linear time, constant space) or a parallel tree-combining approach (logarithmic time, linear space).
In the talk, Fortress is mostly used as the language to present the concepts in. However, I do think that many of the concepts can easily be transferred to Rust.
So I am wondering: Are there already approaches/libraries existing in Rust where concepts such as the Monoid Cached Tree and the parallel prefix/parallel suffix operations that work in this way?