Make conversions work for Float16 (and speed tests)#43
Merged
Conversation
Relevant for Float16, which is not (yet) a true arithmetic type
Member
Author
|
OK, I pushed two more commits and have gotten the tests from ~10min to ~20s. @vchuravy, please check to see whether you think these changes are correct. |
Collaborator
|
Thanks, the for loop was indeed a mistake. This looks good. lgtm |
Member
Author
|
Much of the performance improvement came from other changes, but the This branch: julia> @time include("runtests.jl")
# <output suppressed>
19.473147 seconds (93.47 M allocations: 1.910 GB, 1.71% gc time)If I drop the last commit that changed julia> @time include("runtests.jl")
# <output suppressed>
144.961808 seconds (3.16 G allocations: 143.512 GB, 11.94% gc time)I'd say that's enough of an improvement to be worth it. If you disagree, I'm happy to drop the last commit. |
Collaborator
|
No that looks worth it. Thank you for this. |
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.
Curiously, currently we have this:
As @vchuravy knows well, that may soon be fixed on julia master (see JuliaLang/julia#17297), but since this package also supports julia 0.4 it seems sensible to fix it here.
I also was reminded about how awfully slow the tests are. Poking at this a bit, I discovered that changing two characters (see 06b6372) speeds up the tests by several fold. Moreover, I suspect there's more improvement possible, because this loop isn't type-stable, even on julia-0.5 (the type of
funis changing on each iteration). However, I confess I'm having trouble understanding the purpose of that loop: as far as I can tell, it only ever runs the tests forfun == /. @vchuravy, can you shed some light on this? I'm guessing you meant to run the two lines with@testfor all 4 functions, skipping it for/whenfy == 0, right?