Skip to content

Commit e9b0534

Browse files
authored
Update 2025-11-30-comptime-c-functions.md
1 parent d3b8fa9 commit e9b0534

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ macro_version:
1818
ret
1919
```
2020

21-
The best use-case I can think of for this technique is generating lookup tables at compile-time, as math functions like `sin()` *also* get optimized away. Embedded systems with tight runtime constraints, and zero-cost abstraction C libraries could also use this technique.
21+
The best use-case I can think of for this technique is generating lookup tables at compile-time, as math functions like `sin()` *also* get optimized away.
22+
23+
Embedded systems with tight runtime constraints, and zero-cost abstraction C libraries could also use this technique, but they typically don't want to rely too heavily on the optimizer's cleverness.
2224

2325
[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.
2426

0 commit comments

Comments
 (0)