You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2025-11-30-comptime-c-functions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ The best use-case I can think of for this technique is generating lookup tables
32
32
-`assert()` calls get eliminated when conditions are provably true.
33
33
-[Link-time optimization](https://en.wikipedia.org/wiki/Interprocedural_optimization) with `-flto` should allow Clang and GCC to perform these optimizations even when the code is split across several object files.
34
34
35
-
# Generic Stack
35
+
# Generic stack
36
36
37
37
In this program I use `malloc()` and `free()` in order to demonstrate that they can be optimized away too.
38
38
@@ -192,7 +192,7 @@ int main() {
192
192
}
193
193
```
194
194
195
-
# Generic Hash Map
195
+
# Generic hash map
196
196
197
197
Because a hash map is a much more complex data structure than a stack, GCC struggles to optimize it perfectly.
0 commit comments