testing speed without gradients