reproduce ninja performance in halide.