-
Notifications
You must be signed in to change notification settings - Fork 79
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
[CRPYT] [Python] Use numpy array instead of standard list #132
Comments
TO DISCUSS INSIDE CORE-TEAM : issue to close ? no existing PR but really in project Kanban |
We perform some basic measures for this rule and the result were not satisfying. If there is an advantage to use numpy it must be detailed. I think we should close this one. Here are the things we tested : Use numpy array instead of standard listA - Construction d'une liste1 - Non compliantlist(range(1000000)) 2 - Compliantnp.arange(1000000) B - Itération d'une liste1 - Non compliantListe utilisé : my_list = list(range(1000000)) Code testé : for item in my_list:
tmp = item 2 - CompliantListe utilisé : my_list = np.arange(1000000) Code testé : for item in my_list:
tmp = item C - Récupération d'un élément d'une liste1 - Non compliantListe utilisé : my_list = list(range(1000000)) Code testé : tmp = my_list[500000] 2 - CompliantListe utilisé : my_list = np.arange(1000000) Code testé : tmp = my_list[500000] And the results of the measures : Use numpy array instead of standard listA - Construction d'une listeItération : 500 1 - Non compliant
2 - Compliant
B - Itération d'une listeItération : 200 1 - Non compliant
2 - Compliant
C - Récupération d'un élément d'une listeItération : 100.000.000 1 - Non compliant
2 - Compliant
We can see that the results for the iteration and the access of an element of the list are not so efficient in term of energy. The rule cannot be integrated in this state. |
Related to previous results, this rule is not relevant. A new rules list will be created to list studied rules but refused to archive it and keep results somewhere |
as discussed, I affect this issue to @jhertout to initiate a doc to reference Rules refused or deleted (with reference to issue / PR dealing with discussion about the decision)
|
TEAM 487
The text was updated successfully, but these errors were encountered: