-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Export method instance lookup functions #52176
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
Merged
Merged
Conversation
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
maleadt
reviewed
Nov 15, 2023
Performance of the slow path seems good enough for GPUCompiler? julia> using BenchmarkTools
julia> @benchmark @ccall jl_method_lookup_by_tt(Tuple{typeof(identity), Nothing}::Any, Base.get_world_counter()::Csize_t)::Ref{Core.MethodInstance}
BenchmarkTools.Trial: 10000 samples with 991 evaluations.
Range (min … max): 40.202 ns … 63.825 ns ┊ GC (min … max): 0.00% … 0.00%
Time (median): 41.979 ns ┊ GC (median): 0.00%
Time (mean ± σ): 41.988 ns ± 0.638 ns ┊ GC (mean ± σ): 0.00% ± 0.00%
▁ ▂▂▁▂▃▁ ▂▅▇██▅▄▃▁ ▂
▆▇▁▅▅▅▇▆▄▅▇█▆███████▇▆▇████████████▇▆▅▁▃▃▁▃▁▁▃▁▁▃▁▃▁▁▁▁▃▃▅▇ █
40.2 ns Histogram: log(frequency) by time 44 ns <
Memory estimate: 0 bytes, allocs estimate: 0.
julia> @benchmark @ccall jl_method_lookup(Any[identity, nothing]::Ptr{Any}, 2::Csize_t, Base.get_world_counter()::Csize_t)::Ref{Core.MethodInstance}
BenchmarkTools.Trial: 10000 samples with 992 evaluations.
Range (min … max): 38.800 ns … 15.855 μs ┊ GC (min … max): 0.00% … 99.62%
Time (median): 41.764 ns ┊ GC (median): 0.00%
Time (mean ± σ): 46.033 ns ± 172.107 ns ┊ GC (mean ± σ): 5.05% ± 1.69%
▆▇▅ ▁█
▂▂▃▃▃▂▄███▇▄▂▂▂▁▂▂▃███▃▂▂▂▂▂▂▂▂▂▂▂▁▁▁▂▁▂▂▁▁▂▁▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂ ▃
38.8 ns Histogram: frequency by time 56.8 ns <
Memory estimate: 48 bytes, allocs estimate: 1.
julia> @benchmark @ccall jl_apply_generic(identity::Any, Any[nothing]::Ptr{Any}, 1::Csize_t)::Any
BenchmarkTools.Trial: 10000 samples with 995 evaluations.
Range (min … max): 29.116 ns … 9.606 μs ┊ GC (min … max): 0.00% … 99.47%
Time (median): 32.322 ns ┊ GC (median): 0.00%
Time (mean ± σ): 32.950 ns ± 95.852 ns ┊ GC (mean ± σ): 2.90% ± 0.99%
▅█ ▂▃▅▄▁ ▂▃▃▃▆▄▄▃▅▂▂
▁▁▂▂▂▄▄▆██▆▅▃▃▄▄▆█████▇▄▃▃▂▂▂▁▁▁▁▂▃▃▆▇▆▆▆█████████████▇▄▂▂▂ ▄
29.1 ns Histogram: frequency by time 33.9 ns <
Memory estimate: 32 bytes, allocs estimate: 1. |
4 tasks
97220a0
to
a3438ff
Compare
vtjnash
reviewed
Nov 25, 2023
vtjnash
reviewed
Nov 26, 2023
e14b7bb
to
cca8704
Compare
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.
Ref JuliaGPU/GPUCompiler.jl#530 (comment)