Skip to content

Commit dfbc0a9

Browse files
authored
Update 2025-11-30-comptime-c-functions.md
1 parent 682c26c commit dfbc0a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_posts/2025-11-30-comptime-c-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Compile-time function execution is great, as it means your program has to run le
99
2. You don't want to use evil C macros, as they are debugging nightmares.
1010
3. You want generic data structures that work for all types, and that can use `malloc()` and `free()` internally.
1111

12-
This blog post shows programs where data structures get completely optimized away at compile time by Clang and GCC, using [constant folding](https://en.wikipedia.org/wiki/Constant_folding), [inlining](https://en.wikipedia.org/wiki/Inline_expansion), and [dead code elimination](https://en.wikipedia.org/wiki/Dead-code_elimination). Here is the x86-64 Assembly they generate:
12+
This blog post shows programs where data structures get completely optimized away at compile time by Clang and GCC, using [constant folding](https://en.wikipedia.org/wiki/Constant_folding), [inlining](https://en.wikipedia.org/wiki/Inline_expansion), and [dead code elimination](https://en.wikipedia.org/wiki/Dead-code_elimination). Here is the x86-64 Assembly that they are optimized down to:
1313
```nasm
1414
fn_version: ; label for the fn_version() function
1515
ret ; return statement

0 commit comments

Comments
 (0)