Skip to content

Commit 794e0af

Browse files
authored
Update 2025-11-30-comptime-c-functions.md
1 parent 3c921f2 commit 794e0af

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
@@ -6,7 +6,7 @@ date: 2025-11-30 12:00:00 +0100
66

77
Compile-time function execution is great, as it means your program has to run less code at runtime, but what if:
88
1. You're stuck with C.
9-
2. You don't want to use evil C macros, which are debugging nightmares.
9+
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

1212
The below data structure showcase programs get 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):

0 commit comments

Comments
 (0)