Count the frequency of letters in texts using parallel computation.
Parallelism is about doing things in parallel that can also be done sequentially. A common example is counting the frequency of letters. Employ parallelism to calculate the total frequency of each letter in a list of texts.
Wren provides concurrency via a construct called fibers. From the Wren manual:
Fibers are a bit like threads except they are cooperatively scheduled. That means Wren doesn’t pause one fiber and switch to another until you tell it to.
Wren's execution is single-threaded so we don't actually get parallelism.
Here's a quick definition for each that illustrates the diferences between the two:
Read more about concurrency in Wren.
Sign up to Exercism to learn and master Wren with 99 exercises, and real human mentoring, all for free.
We explore the differences between concurrency and parallelism, looking at different approaches taken by languages such as JavaScript, Go, Elixir and Rust.