Some microoptimizations.

MFC after:	1 month