Find Related products on Amazon

Shop on Amazon

Faster interpreters in Go: Catching up with C++

Published on: 2025-05-11 23:59:55

Faster interpreters in Go: Catching up with C++ By Vicent Martí | March 20, 2025 The SQL evaluation engine that ships with Vitess, the open-source database that powers PlanetScale, was originally implemented as an AST evaluator that used to operate directly on the SQL AST generated by our parser. Over this past year, we've gradually replaced it with a Virtual Machine which, despite being written natively in Go, performs similarly to the original C++ evaluation code in MySQL. Most remarkably, the new Virtual Machine has repeatedly proven itself easier to maintain than the original Go interpreter, even though it's orders of magnitude faster. Let's review the implementation choices we've made to get these surprising results. Vitess has been designed for unlimited horizontal scaling. To accomplish this, all queries to a Vitess cluster must go through a vtgate . Since you can deploy as many vtgate instances as you want, because they’re essentially stateless, this allows you to grow the c ... Read full article.