perf(all): loop optimization