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

@inline binary heap top call #292

Merged
merged 2 commits into from
Nov 2, 2017

Conversation

ChrisRackauckas
Copy link
Contributor

This will allow @inbounds to propagate into this call.

This will allow `@inbounds` to propagate into this call.
@yuyichao
Copy link
Contributor

yuyichao commented Jun 7, 2017

is this function too large to be automatically inlined?

@ChrisRackauckas
Copy link
Contributor Author

In profiling I found this to be a surprisingly expensive operation, so I assumed this must be part of it. I'll see if I can find out more directly.

(But I also thought that inline-ing will only let @inbounds through if you @inline)

@codecov
Copy link

codecov bot commented Jun 7, 2017

Codecov Report

Merging #292 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #292      +/-   ##
=========================================
+ Coverage    95.9%   95.9%   +<.01%     
=========================================
  Files          31      31              
  Lines        2244    2245       +1     
=========================================
+ Hits         2152    2153       +1     
  Misses         92      92
Impacted Files Coverage Δ
src/heaps/mutable_binary_heap.jl 92.66% <100%> (ø) ⬆️
src/heaps/binary_heap.jl 100% <100%> (ø) ⬆️
src/priorityqueue.jl 88.76% <0%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 161792b...8478bfb. Read the comment docs.

@oxinabox oxinabox merged commit 4cd1448 into JuliaCollections:master Nov 2, 2017
@ChrisRackauckas ChrisRackauckas deleted the patch-1 branch November 2, 2017 02:04
@oxinabox
Copy link
Member

oxinabox commented Nov 2, 2017

The inlining properation rules are a bit complex (for good reasons).
https://docs.julialang.org/en/latest/devdocs/boundscheck/

AFAICT @ChrisRackauckas is generally right, though there might be a better way (eg with @propergate_inbounds).
But in general a lot of the code needs an audit over its use of @inline as a lot was written for versions of julia with marginally (or significantly) different inlining rules.

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

Successfully merging this pull request may close these issues.

3 participants