Il faut utiliser les variables locales pour gagner en vitesse.
Sur ma machine, avec utilisation de variables locales :
real 0m18.339s
user 0m17.366s
sys 0m0.003s
Sans :
real 0m21.045s
user 0m20.059s
sys 0m0.007s
The capacity of the human mind for swallowing nonsense and spewing it forth in violent and repressive action has never yet been plumbed. -- Robert A. Heinlein
# Pour le code lua
Posté par téthis . En réponse au journal Javascript plus rapide que python ! (une suite possible). Évalué à 5.
Il faut utiliser les variables locales pour gagner en vitesse.
Sur ma machine, avec utilisation de variables locales :
real 0m18.339s
user 0m17.366s
sys 0m0.003s
Sans :
real 0m21.045s
user 0m20.059s
sys 0m0.007s
The capacity of the human mind for swallowing nonsense and spewing it forth in violent and repressive action has never yet been plumbed. -- Robert A. Heinlein