Slightly faster SH basis implementation.#1
Merged
jdtournier merged 1 commit intomasterfrom May 8, 2014
Merged
Conversation
Member
Author
|
Yes, of course. I wrote a unit test evaluating all functions affecting by the commit, and compared the output between this pull request and the current master branch. Results are identical up to numerical differences (max difference 1e-6). |
jdtournier
added a commit
that referenced
this pull request
May 8, 2014
Slightly faster SH basis implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I eliminated some unnecessary sine and cosine calculations, resulting in a slight speed gain.
Using iFOD2 on a software phantom, the current master branch gets me:
gtime tckgen csd/fod10.mif -mask mask.mif -number 100000 -seed_image mask.mif csd/test.tck -force
tckgen [WARNING]: existing output files will be overwritten
103565 generated, 100000 selected [100%]
843.04user 1.89system 3:44.91elapsed 375%CPU (0avgtext+0avgdata 263208960maxresident)k
0inputs+22outputs (32major+16220minor)pagefaults 0swaps
whereas with this commit, I get:
gtime tckgen csd/fod10.mif -mask mask.mif -number 100000 -seed_image mask.mif csd/test.tck -force
tckgen [WARNING]: existing output files will be overwritten
103592 generated, 100000 selected [100%]
800.80user 2.91system 3:27.70elapsed 386%CPU (0avgtext+0avgdata 263012352maxresident)k
3inputs+22outputs (193major+16043minor)pagefaults 0swaps