Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EC3[PHP] - Getting the size of the collection in the loop #109

Closed
JB-Ginguene opened this issue Apr 5, 2023 · 0 comments · Fixed by #162
Closed

EC3[PHP] - Getting the size of the collection in the loop #109

JB-Ginguene opened this issue Apr 5, 2023 · 0 comments · Fixed by #162
Assignees
Labels
🗃️ rule rule improvment or rule development or bug 🏆 challenge2023 🏆 Work done during the ecoCode Challenge 2023 php 👀 👀 review done 👀 👀 review done - waiting for changes

Comments

@JB-Ginguene
Copy link
Contributor

JB-Ginguene commented Apr 5, 2023

[ecoCode challenge 2023 - Team 28 days]

When iterating over any collection, fetch the size of the collection in advance to avoid fetching it on each iteration, this saves CPU cycles, and therefore consumes less power.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗃️ rule rule improvment or rule development or bug 🏆 challenge2023 🏆 Work done during the ecoCode Challenge 2023 php 👀 👀 review done 👀 👀 review done - waiting for changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants