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

Fast path mis-attributes #118

Closed
maleadt opened this issue May 11, 2021 · 0 comments
Closed

Fast path mis-attributes #118

maleadt opened this issue May 11, 2021 · 0 comments
Labels

Comments

@maleadt
Copy link
Contributor

maleadt commented May 11, 2021

julia> to = TimerOutput()
 ──────────────────────────────────────────────────────────────────
                           Time                   Allocations      
                   ──────────────────────   ───────────────────────
 Tot / % measured:      546ms / 0.00%           33.0MiB / 0.00%    

 Section   ncalls     time   %tot     avg     alloc   %tot      avg
 ──────────────────────────────────────────────────────────────────
 ──────────────────────────────────────────────────────────────────

julia> @timeit to "foo" identity(nothing)

julia> @timeit to "foobar" begin
           @timeit to "foo" identity(nothing)
           @timeit to "baz" identity(nothing)
       end

julia> @timeit to "baz" identity(nothing)

julia> to
 ──────────────────────────────────────────────────────────────────
                           Time                   Allocations      
                   ──────────────────────   ───────────────────────
 Tot / % measured:      7.17s / 0.10%           51.8MiB / 0.08%    

 Section   ncalls     time   %tot     avg     alloc   %tot      avg
 ──────────────────────────────────────────────────────────────────
 foo            1   6.92ms   100%  6.92ms   43.1KiB  96.1%  43.1KiB
 foobar         1   13.3μs  0.19%  13.3μs   1.75KiB  3.90%  1.75KiB
   baz          2   11.6μs  0.17%  5.79μs     64.0B  0.14%    32.0B
   foo          1   4.41μs  0.06%  4.41μs     32.0B  0.07%    32.0B
 ──────────────────────────────────────────────────────────────────

foobar/baz has two calls, which is incorrect (one should be toplevel)

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

No branches or pull requests

2 participants