Which approach for looping layouts/repeaters are best for front end performance – using have_rows() or loop through an array with foreach()?
It should not make any difference. ACF loads all values for all of the fields in all of the layouts when you do get_field('flex_field')
or on the first occurrence of have_rows('flex_field')
and caches all of the values.