In this paper we present CASM, a language based on Abstract State Machines (ASM), and its optimizing compiler. ASM is a welldefined (formal) method based on algebraic concepts. A distinct feature of ASM is its combination of parallel and sequential execution semantics. This makes it an excellent choice to formally specify and verify micro-architectures. We present a compilation scheme and an implementation of a runtime system supporting efficient execution of ASM. After introducing novel analysis techniques we present optimizations allowing us to eliminate many costly operations.Benchmark results show that our baseline compiler is 2-3 magnitudes faster than other ASM implementations. The optimizations further increase the performance of the compiled programs up to 264%. The achieved performance allows our ASM implementation to be used with industry-size applications.