Introducing Guillotine
The ultrafast EVM for every language and platform
And the future of Tevm
Guillotine is fast
Early benchmarks compete to be the fastest EVM ever
More perf optimizations are planned for Beta release
Guillotine is universal
Tevm's goal: enable ethereum platform to run everywhere with no compromises
Guillotine is endgame to this mission
Uncompromizing speed and size benifits to whatever language you are using from Python to Swift to Rust
Speaking of size, Guillotine is also small
We have been mostly focused on speed recently. But early benchmarks for size got as small as 110kb wasm size when built with ReleaseSmall flag. A near 4x improvement over previous best options and a huge win for Tevm!
Guillotine is written in Zig, and it is an interpreter (like revm) not a client (like reth).
We have built guillotine specifically with a high performance execution client optimizations in mind. Follow this account for updates in future on this
Guillotine is in early alpha and not suitable for any production or non production use cases at this time
Star and follow the repo for more updates
github.com/evmts/guilloti…
To help measure performance, I have started seperate repos to hold benchmarks in various languages starting in rust
Please contribute if you would like to add more benchmark test cases or evms
github.com/evmts/evm-benc…
So let's dive into some details about how this is architected and why it's so fast
- Data oriented design
- Brand prediction
- Microoptimizations
Guillotine is built data-first with simple code and minimal abstractions
Our simple code is not only maintainable but also allows the zig compiler freedom to make binaries small and fast!
Our core data structure is the frame aka stackframe. Every evm handler is a method on the frame struct and it's highly optimized to have as small of a memory footprint as possible and minimize cpu cache pressure
Our EVM does preanalysis that includes
- validating the bytecode to allow us to turn off safety checks later in the execution
- fusing common bytecode sequences into single dispatches
- creating a cache friendly intermediate data structure from the bytecode
Our instruction handlers utilize tailcall recursion
Some opcodes read metadata from slot+1 like constant push values
Most simply read the next function pointer to the next opcode handler and execute it with tail call recursion
Tailcall recursion minimizes stack frame creation and maximizes cpu branch prediction compared to a switch statement resulting in huge performance wins
Guillotine was built by @FUCORY with help from @0xpolarzero and @Vladfdp .
We are a small team with minimal funding and always looking for contributions
@FUCORY @0xpolarzero @Vladfdp Guillotine has a philosophy of minimum dependencies but we want to thank the following crypto 3rd party dependencies
- arkworks
- c-zkg-4844
- keccak-asm
- zig std library
@FUCORY @0xpolarzero @Vladfdp We also want to thank some of our tooling dependencies
- zig
- zbench
- foundry-compilers
@FUCORY @0xpolarzero @Vladfdp We studied every EVM and other interpreters such as Wasm interpreters cpython and Lua to build this EVM
Special thanks to the following EVM who were all heavily inspirational
- Ethereumjs
- Evmone
- Geth
- Revm
Special thanks to Revm who we also use for differential testing
@FUCORY @0xpolarzero @Vladfdp Finally, like all Tevm work Guillotine is MIT license
We just want to get ethereum on every platform ya'll
Please use the software however it can help you
@FUCORY @0xpolarzero @Vladfdp Check out our powerful CLI EVM debugging app that we are working on shipping along with guillotine
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.
