|
|
|
|
|
by Ygg2
479 days ago
|
|
> I’m not saying every C compiler is always perfectly predictable No C compiler is predictable. First, there is the compiler magic of optimization. Then you have Undefined Behavior, which in C, that's almost a guarantee, you'll experience inconsistent behavior between compilers, targets, optimization levels and the phases of the moon. In Rust, use .iter a lot to avoid bound checks, or if you want auto-vectorization use a lot of fixed length arrays, and look how LLVM auto-vectorizes it. It takes getting used to it, but hey, so does literally every language if you care about SOURCE -> ASSEMBLY translation. |
|