-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Pystone uses floats #65833
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
Comments
Pystone uses some floats in Python 3, while in Python 2 it's all integers. And since it is, as far as I can tell, based on Dhrystone, it should be all ints. After fixing the division in the loop to be a floor division it runs the same as in Python 2. I've verified that after the attached fix the only floats created are time stamps, so this seems to be all that's needed. This also makes the benchmark run c:a 5% faster, lessening the speed difference in pystone between Python 2 and Python 3, which contributes to the misconception that Python 3 is horribly slow. |
According to the name of variables ("IntLoc2 = IntLoc3 // IntLoc1"), I agree that integers should be used. Since the performances can be different between int and float, you should change the version and explain your change in the changelog (in the top docstring). |
Yes, good point, I added this in a new diff. |
+ Unde Python 3 version 1.1 would use the normal division I guess that it's a typo: "Under Python 3 ..."? |
Oups, yes, that's a typo. |
New changeset 1318324aa93a by Victor Stinner in branch '3.4': New changeset 95b7acdc0f24 by Victor Stinner in branch 'default': |
Thanks the patch, I fixed pystone in Python 3.4 and 3.5. |
Awesome, thanks! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: