How fast is your MEV bot? Comparing Javascript/Python/Rust

Choosing a programming language for your projects can be a challenging task. In fact, individuals often have varying preferences when asked, citing reasons such as speed, readability, or simply familiarity with a particular language. This diversity in opinions is quite common.

I’ve encountered this situation multiple times in the past, which led me to learn six different programming languages. While it was an enjoyable experience, I eventually stopped using C# and Java.

In the MEV (Miner Extractable Value) space, four mainstream programming languages dominate: Python, JavaScript, Rust, and Golang.

Among these, I’ll focus on the first three and conduct a speed performance benchmark. This benchmark will simulate scenarios commonly seen in real-life trading situations. By doing so, readers can gain insight into the competitive nature of each language stack regarding MEV.

I’ve excluded Golang from this comparison for now. Despite its widespread use in the blockchain industry, Golang doesn’t yet boast as many open-source projects related to MEV compared to the other three languages. My intention is for this benchmark session to remain as mainstream as possible, taking into account language stack popularity and the libraries most likely to be utilized by developers.

Read More