Just because we’re on the topic of performance: the rust optimizer can sometimes generate better code if you use map / filter / etc. The slice iterator in any context is a huge win over manual array iteration because it only needs to do bounds checking once.
Javascript (v8, last I checked) is the opposite. Simple for loops almost always outperform anything else.