Add loop optimization comparison