Parallel Smart Contracts for Speed
Threading in Solidity to Optimize Execution
**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.