Tevm Profile picture
Sep 10 17 tweets 6 min read Read on X
Introducing Guillotine

The ultrafast EVM for every language and platform

And the future of Tevm Image
Guillotine is fast

Early benchmarks compete to be the fastest EVM ever

More perf optimizations are planned for Beta release Image
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 Image
Image
Image
Image
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! Image
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 Image
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 pressureImage
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 Image
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 winsImage
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 Image
@FUCORY @0xpolarzero @Vladfdp We also want to thank some of our tooling dependencies

- zig
- zbench
- foundry-compilers Image
@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 Image
@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 Image
@FUCORY @0xpolarzero @Vladfdp Check out our powerful CLI EVM debugging app that we are working on shipping along with guillotine

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Tevm

Tevm Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(