1. 5
    1. 1

      I have a couple of questions that I couldn’t see the answers to on a quick skim through the article: what was the copying trick that made it faster? The graphs seem to say that the rayon version of the code got 10x faster between the first chart and the second chart, but I didn’t see anything about that? The second chart seems to say the custom rayon replacement is 1.1x faster?

      1. 1

        what was the copying trick that made it faster?

        As the introduction briefly mentions, this (and many other optimizations that made the runtime improve by 10x) will be covered in a follow-up post, that isn’t published yet :)

        The graphs seem to say that the rayon version of the code got 10x faster between the first chart and the second chart, but I didn’t see anything about that? The second chart seems to say the custom rayon replacement is 1.1x faster?

        What’s perhaps not obvious is that the left axis scale changed in the second chart. If you look closely, the total runtime went down from 300ms to 30ms with 1 thread for example. So there was a 10x speed-up, but that wasn’t only by switching away from Rayon, the Rayon backend got a 10x speed-up too!

        So in short: the switch from Rayon wasn’t the main factor for a 10x speed-up (far from it), and the other optimizations will be covered in the second post. I decided to split the article into 2 posts as it was getting quite long, but I realize that it’s perhaps not the clearest now as some pieces are missing. Stay tuned for the second part next week!