Author: Adán Sánchez de Pedro Crespo 2017-11-03 00:45:40
Published on: 2017-11-03T00:45:40+00:00
The Simplicity programming language uses jets, which are a smart optimization that makes complex Simplicity contracts cheaper to compute. Jets leverage the most important element of the Simplicity Bit Machine: the frames stack. In a Simplicity program, every expression or sub-expression can be thought of as a pure function that results in the active write frame having a different value when applied on a certain initial read frame. If the Simplicity interpreter finds some expression whose result when applied upon a certain read frame is already known, it doesn't need to execute such expression step-by-step once again. Instead, it writes the known result to the active write frame. The interpreter knows the result of applying many common operations on all possible combinations of inputs in the range of 8 to 256 bits at all times. Jets can help make Simplicity programs lighter on CPU usage and can replicate the behavior of complex chunks of Simplicity code with the guarantee that they can't introduce side effects. Interpreter-bundled jets are formally proven. Different sets of jets could make up different single-purpose dialects, just like domain-specific languages bring richer vocabulary and semantics to the bare syntax and grammar of general-purpose languages.
Updated on: 2023-06-12T21:57:28.235673+00:00