remove forEach bottlenecks, swap mat.vmul params