From 6d5c64f35132213b61e35f32d9f4c04459981e1a Mon Sep 17 00:00:00 2001 From: zleyyij Date: Sat, 29 Jun 2024 00:04:48 -0600 Subject: [PATCH] vault backup: 2024-06-29 00:04:48 --- Untitled.md | 0 notes/Copy-and-Patch Compilation.md | 4 ++++ 2 files changed, 4 insertions(+) delete mode 100644 Untitled.md diff --git a/Untitled.md b/Untitled.md deleted file mode 100644 index e69de29..0000000 diff --git a/notes/Copy-and-Patch Compilation.md b/notes/Copy-and-Patch Compilation.md index c3b10d0..8e8ebec 100644 --- a/notes/Copy-and-Patch Compilation.md +++ b/notes/Copy-and-Patch Compilation.md @@ -4,6 +4,7 @@ Copy and patch is a novel compilation technique introduced in the above paper th They provide two example use cases, a compiler for a C-like language, and a WebAssembly compiler, and show promising results for both startup time and execution performance. +# Performance Results (Bottom of Page 2): > Our compiler achieves both lower startup delay and better execution performance than prior baseline compilers. Figure 2 shows the performance of six WebAssembly compilers on the PolyBenchC benchmark, normalized to our performance. Our compiler has 6.5× lower startup delay than Liftoff, while generating on average 63% better-performing code. @@ -14,6 +15,9 @@ One proposed use case of copy-and-patch compilation in the paper is as an SQL qu (Halfway through Page 3): > The compilation time of our compiler is so low that it is less than the time it takes to construct the AST of the program. Compared with interpreters, both have negligible startup delay (since constructing ASTs takes longer), but our execution performance is an order of magnitude faster. Compared with LLVM -O0, our implementation compiles two orders of magnitude faster and generates code that performs on average 14% better. Therefore, we conclude that copy-and-patch renders both interpreters and LLVM -O0 compilation obsolete in this use case. +# Implementation Details +At a broad level, copy and patch code compilation works by having a pre-built library of composable binary code snippets, referred to as binary stencils. This makes both code generation and optimization a simple task, achieved simply by performing a lookup in + # Terminology | Phrase | Definition | | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |