Lots of optimizations to CPU platform