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

Improve hash memory management #106

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MrKrzYch00
Copy link
Contributor

@MrKrzYch00 MrKrzYch00 commented Apr 22, 2016

  • Small speed up when running a lot of iterations

Before:
real 13m55.064s
user 13m54.610s
sys 0m0.180s

After:
real 13m48.580s
user 13m48.555s
sys 0m0.010s

  • tested on Odroid U3 O/C 1.92Ghz, 5000 iterations on old lodepng.cpp
    sourcecode file. Default makefile used.

The speed improvement should be greater when Hash Same Hash is enabled.

- Small speed when running a lot of iterations

Before:
real    13m55.064s
user    13m54.610s
sys     0m0.180s

After:
real    13m48.580s
user    13m48.555s
sys     0m0.010s

* tested on Odroid U3 O/C 1.92Ghz, 5000 iterations on old lodepng.cpp
sourcecode file.
@jibsen
Copy link
Contributor

jibsen commented Jul 21, 2016

Technically, you are not guaranteed that int is using two's-complement, so you cannot set them to -1 using memset. I know it will likely be hard to find a platform where this is not the case, but perhaps it is better to stay on the safe side of the standard if the improvement is so relatively small?

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

Successfully merging this pull request may close these issues.

2 participants