More speed improvement by code duplication.