In this web content, the author discusses how they improved the speed of their language, Neat, by making a simple change to how arrays are passed as parameters. Previously, Neat arrays were passed as a three-pointer struct, but the author changed it to be passed as three separate pointer parameters. This change significantly sped up Neat, making it perform better compared to other languages like D. The reason for the performance difference is that struct sizes greater than 16 bytes are passed by pointer according to the SystemV AMD64 ABI specification. The author provides a benchmark that demonstrates the improvement in performance. They also suggest considering this optimization for other languages or when working with APIs. Overall, this change has the potential to provide a surprising and significant speed boost for certain cases.
https://gist.github.com/FeepingCreature/5dff669aad380a123b15659e195fb96c