switch (x) jumptable case 0: goto L0; case 1: goto L1; default: goto Ldefault;
| Benchmark | Standard C-- | Optimized C-- | Speedup | |-----------|--------------|---------------|---------| | Vector add (float[1024]) | 3.2 cycles/elem | 0.4 cycles/elem (SIMD) | 8× | | Binary tree sum (recursive) | 14.2 ns | 5.1 ns (tailcall) | 2.8× | | Memcpy (256 bytes) | 12.4 ns | 2.3 ns (aligned SIMD) | 5.4× | Optimized C-- Pdf
If generating C-- for x86, add peephole rules: replace addl $1, %eax ; addl $1, %eax with addl $2, %eax . Different architectures require different patterns. switch (x) jumptable case 0: goto L0; case
Naive C-- translation: