C: optimizations