More performance improvements

Little performance improvements in order to make `visit` faster.

Also adds a new performance test: "Visit"