sorting: inline check-bounds.