Parallel Smart Contracts for Speed

Threading in Solidity to Optimize Execution

Winston Robson
2 min readJan 30, 2024

**Some incomplete thoughts on parallel execution **

Smart contract code is traditionally executed sequentially. Meaning code executes a, b, c, d, and so on.

Solidity, the programming language used for developing smart contracts on the Ethereum blockchain has evolved, however, to fulfill the requirement for higher performance as onchain activity grows, with concurrent and parallel execution.

Meaning code executes abcd all at once, in parallel, across threads.

A thread in computer science is short for a thread of execution. Threads are a way for a program to split itself into two or more simultaneously (or pseudo-simultaneously) running tasks. (Source: Thread)

Threads and processes differ from one operating system to another but, in general, a thread is contained inside a process and different threads in the same process share the same resources while different processes in the same multitasking operating system do not.

--

--

Winston Robson

https://gumdropsteve.github.io/blog — “Energy may be likened to the bending of a crossbow, decision to the releasing of a trigger.”