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

living dangerously unsafe array cast #147

Closed
wants to merge 5 commits into from

Conversation

Moelf
Copy link
Member

@Moelf Moelf commented Feb 15, 2022

replace #112

before:

julia> const tree = LazyTree("/home/akako/Downloads/Run2012BC_DoubleMuParked_Muons.root", "Events");

julia> @time sum(length, tree.Muon_pt)
  3.389927 seconds (1.22 M allocations: 2.995 GiB, 6.44% gc time, 10.32% compilation time)
149322456

julia> @time sum(length, tree.Muon_pt)
  2.848210 seconds (18.39 k allocations: 2.934 GiB, 2.27% gc time)
149322456

julia> @time sum(length, tree.Muon_pt)
  2.899749 seconds (18.39 k allocations: 2.934 GiB, 2.31% gc time)

after:

julia> const tree = LazyTree("/home/akako/Downloads/Run2012BC_DoubleMuParked_Muons.root", "Events");

julia> @time sum(length, tree.Muon_pt)
  3.359160 seconds (991.40 k allocations: 2.428 GiB, 6.44% gc time, 9.35% compilation time)
149322456

julia> @time sum(length, tree.Muon_pt)
  2.774870 seconds (18.39 k allocations: 2.378 GiB, 1.34% gc time)
149322456

julia> @time sum(length, tree.Muon_pt)
  2.783174 seconds (18.39 k allocations: 2.378 GiB, 1.18% gc time)
149322456

@codecov
Copy link

codecov bot commented Feb 15, 2022

Codecov Report

Merging #147 (2b9096d) into master (ad11fb6) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
- Coverage   91.32%   91.24%   -0.08%     
==========================================
  Files          11       11              
  Lines        1522     1497      -25     
==========================================
- Hits         1390     1366      -24     
+ Misses        132      131       -1     
Impacted Files Coverage Δ
src/iteration.jl 89.77% <ø> (+0.70%) ⬆️
src/UnROOT.jl 91.30% <100.00%> (-1.01%) ⬇️
src/custom.jl 98.68% <100.00%> (-0.02%) ⬇️
src/root.jl 93.53% <100.00%> (-0.56%) ⬇️
src/displays.jl 75.55% <0.00%> (-0.54%) ⬇️
src/io.jl 89.06% <0.00%> (-0.34%) ⬇️
src/streamsource.jl 82.08% <0.00%> (-0.27%) ⬇️
src/bootstrap.jl 92.99% <0.00%> (-0.10%) ⬇️
... and 5 more

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 ad11fb6...2b9096d. Read the comment docs.

@Moelf
Copy link
Member Author

Moelf commented Feb 15, 2022

@aminnj we can't do the ccall in versions <1.7, what's your preferred solution:

  1. return BitVector for < 1.7 (i.e. add a @static if-else in LazyBranch definition)
  2. do the collect() special case for Boolean for <1.7 (currently in this PR)

@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Base: 90.27% // Head: 90.08% // Decreases project coverage by -0.19% ⚠️

Coverage data is based on head (bd63a19) compared to base (8b16c8f).
Patch coverage: 94.11% of modified lines in pull request are covered.

❗ Current head bd63a19 differs from pull request most recent head d275941. Consider uploading reports for the commit d275941 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
- Coverage   90.27%   90.08%   -0.20%     
==========================================
  Files          11       11              
  Lines        1625     1613      -12     
==========================================
- Hits         1467     1453      -14     
- Misses        158      160       +2     
Impacted Files Coverage Δ
src/iteration.jl 89.34% <ø> (+0.55%) ⬆️
src/UnROOT.jl 77.77% <88.88%> (-22.23%) ⬇️
src/custom.jl 97.87% <100.00%> (-0.11%) ⬇️
src/root.jl 93.95% <100.00%> (-0.28%) ⬇️
src/displays.jl 78.26% <0.00%> (+0.23%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Moelf Moelf closed this Oct 22, 2022
@Moelf Moelf deleted the in_place_ntoh branch October 22, 2022 19:06
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.

1 participant