summaryrefslogtreecommitdiff
path: root/ARCHITECTURE.md
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2024-01-29 20:39:31 +0100
committerHenry Gressmann <mail@henrygressmann.de>2024-01-29 20:39:31 +0100
commitf8651619e576ac97209b72660144568b54eb965c (patch)
tree6bbf232f2b7444d02ef6cb2192759f628ce2ab8f /ARCHITECTURE.md
parent4c9385df1bcc0098c7e1db7a2f7c7e3dbeb00c8b (diff)
feat: pre-processed wasm
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'ARCHITECTURE.md')
-rw-r--r--ARCHITECTURE.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 28607da..d3816d0 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -17,7 +17,8 @@ Some key differences are:
## Bytecode Format
To improve performance and reduce code size, instructions are encoded as enum variants instead of opcodes.
-This allows preprocessing the bytecode into a more compact format, which can be loaded directly into memory and executed without decoding later. This can skip the decoding step entirely on resource-constrained devices where memory is limited.
+This allows preprocessing the bytecode into a more compact format, which can be loaded directly into memory and executed without decoding later. This can skip the decoding step entirely on resource-constrained devices where memory is limited. See this [blog post](https://wasmer.io/posts/improving-with-zero-copy-deserialization) by Wasmer
+for more details which inspired this design.
Some instructions are split into multiple variants to reduce the size of the enum (e.g. `br_table` and `br_label`).
Additionally, label instructions contain offsets relative to the current instruction to make branching faster and easier to implement.