Changed optimization level to -Ofast. Runs at 60fps on device now.