implement @time and @timev in terms of @timed#52889
Merged
IanButterworth merged 6 commits intoJuliaLang:masterfrom Jan 20, 2024
Merged
implement @time and @timev in terms of @timed#52889IanButterworth merged 6 commits intoJuliaLang:masterfrom
@time and @timev in terms of @timed#52889IanButterworth merged 6 commits intoJuliaLang:masterfrom
Conversation
Member
|
Sounds good to me. We'd need to check that we're not hitting unexpected compilation due to this change. |
Contributor
Author
|
Do you know a good way to do that? I tried the example from #48024 (comment): ❯ ./julia --startup-file=no -q
julia> double(x::Real) = 2x
double (generic function with 1 method)
julia> calldouble(container) = double(container[1])
calldouble (generic function with 1 method)
julia> calldouble2(container) = calldouble(container)
calldouble2 (generic function with 1 method)
julia> @time @eval calldouble([1.0])
0.009445 seconds (2.48 k allocations: 116.594 KiB, 30.16% compilation time) # master
0.007254 seconds (2.48 k allocations: 116.594 KiB, 30.60% compilation time) # PR
2.0
julia> @time @eval calldouble2(1.0)
0.002668 seconds (3.81 k allocations: 194.422 KiB, 93.59% compilation time) # master
0.003196 seconds (3.81 k allocations: 194.422 KiB, 95.07% compilation time) # PR
2.0which at least looks similar, though I don't know if it means anything. |
ericphanson
commented
Jan 13, 2024
Member
|
Needs news for the new fields |
Contributor
Author
|
do we like these field names? we could do |
Member
|
|
inkydragon
reviewed
Jan 20, 2024
Co-authored-by: inky <git@wo-class.cn>
IanButterworth
approved these changes
Jan 20, 2024
Member
IanButterworth
left a comment
There was a problem hiding this comment.
LGTM. Avoids duplication and the consistency in outputs seems good to me
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.
closes #47056
I suspect there was some reason this wasn't done in the first place, but I figured opening a PR could be a way to discuss that.
Needs tests still for the new@timedfields.