-
Notifications
You must be signed in to change notification settings - Fork 17
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
make branch basket buffer threadlocal #76
Conversation
Codecov Report
@@ Coverage Diff @@
## master #76 +/- ##
==========================================
+ Coverage 82.55% 83.10% +0.54%
==========================================
Files 10 10
Lines 1244 1302 +58
==========================================
+ Hits 1027 1082 +55
- Misses 217 220 +3
Continue to review full report at Codecov.
|
Awesome! Btw. the memory estimation is very basic and does not catch nested data well, that's why it can grow larger than the set 1GB. |
Since @threads for (i,evt) in enumerate(t)
i>5 && break
evt.nMuon != 2 && continue
sum(evt.Muon_charge) != 0 && continue
# ...
end because @threads for i in 1:length(t)
i>5 && break
t.nMuon[i] != 2 && continue
sum(t.Muon_charge[i]) != 0 && continue
# ...
end However, our |
As far as features, I think I'm done in this PR. A review is welcome :) |
Weeeha! 😃 |
* make branch basket buffer threadlocal * clean up * allow getindex to work with enumerate * avoid reading the whole event * don't hijack all enumerations * test looping interfaces * cover extra methods * 1.3 doesn't even like the regular loop interface
In each of the branch objects, the last-read basket data is stored. If one tried to naively
@threads
an event loop, there would be huge contention in this buffer cache. This PR makesnthreads()
such buffer caches.gives
for julia with 4 threads on a mac laptop. That's about a 2.5x speedup (consistent with me seeing 300% cpu usage instead of 400%).
Note that I commented out the LRU cache around
readbasketseek()
in both cases to keep RAM usage low (seems to go beyond the advertisedmaxsize=1024^3
🤷)The example comes from #73 .