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

Would there be a speedup if we invoked a use integer? #398

Closed
petdance opened this issue Nov 4, 2013 · 2 comments
Closed

Would there be a speedup if we invoked a use integer? #398

petdance opened this issue Nov 4, 2013 · 2 comments

Comments

@petdance
Copy link
Collaborator

petdance commented Nov 4, 2013

Are all our math operations floating point for no reason? Will use integer help speed anything up?

@bk2204
Copy link

bk2204 commented Dec 21, 2013

I did some tests on the repository for git, and it doesn't seem that "use integer" makes any difference.

Before

../ack2/ack-standalone use 1.79s user 0.12s system 51% cpu 3.713 total
../ack2/ack-standalone use 5.06s user 0.26s system 95% cpu 5.593 total
../ack2/ack-standalone use 1.66s user 0.12s system 47% cpu 3.708 total
../ack2/ack-standalone use 1.60s user 0.11s system 47% cpu 3.613 total
../ack2/ack-standalone use 1.66s user 0.09s system 48% cpu 3.609 total

../ack2/ack-standalone use > /dev/null 1.21s user 0.03s system 99% cpu 1.244 total
../ack2/ack-standalone use > /dev/null 1.15s user 0.03s system 99% cpu 1.179 total
../ack2/ack-standalone use > /dev/null 1.27s user 0.03s system 99% cpu 1.302 total
../ack2/ack-standalone use > /dev/null 1.12s user 0.05s system 99% cpu 1.169 total
../ack2/ack-standalone use > /dev/null 1.06s user 0.04s system 99% cpu 1.101 total

After

../ack2/ack-standalone use 1.60s user 0.12s system 48% cpu 3.582 total
../ack2/ack-standalone use 1.78s user 0.08s system 51% cpu 3.630 total
../ack2/ack-standalone use 1.55s user 0.10s system 45% cpu 3.596 total
../ack2/ack-standalone use 1.66s user 0.11s system 48% cpu 3.621 total
../ack2/ack-standalone use 1.62s user 0.12s system 47% cpu 3.645 total

../ack2/ack-standalone use > /dev/null 1.13s user 0.04s system 99% cpu 1.176 total
../ack2/ack-standalone use > /dev/null 1.14s user 0.02s system 99% cpu 1.164 total
../ack2/ack-standalone use > /dev/null 1.10s user 0.02s system 99% cpu 1.126 total
../ack2/ack-standalone use > /dev/null 1.14s user 0.02s system 99% cpu 1.171 total
../ack2/ack-standalone use > /dev/null 1.20s user 0.02s system 99% cpu 1.228 total

As you can see, the numbers don't indicate any significant change by using "use integer". I think the one five-second time is just an anomaly, so I wouldn't consider it.

@petdance
Copy link
Collaborator Author

Thanks for this. I've put a note in my new DESIGN.md file that tracks these sorts of design decisions.

https://github.com/petdance/ack2/blob/dev/DESIGN.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants