Earlier quoted context omitted.
Does anyone have any ideas for what's happening in the Python example? Could you post the Python code?
Sure... here is maxval1.py: for i in range(1, 100000000/10): pass And here is maxval2.py: maxval=100000000/10 for i in range(1, maxval): pass
Re: 40 Tips for optimizing your php Code
#11Oh, of course - range() is evaluated once in either case. It returns an array, which is then stepped through. The time difference must have been just some inaccuracy. I guess 'time' isn't the best command to use to test efficiency ... or maybe try adding another 0?