-
Notifications
You must be signed in to change notification settings - Fork 60
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
[WIP] Add a c++ implementation for podio-dump
#620
Open
tmadlener
wants to merge
8
commits into
AIDASoft:master
Choose a base branch
from
tmadlener:podio-dump-cpp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
tmadlener
commented
Jun 7, 2024
@@ -1,3 +1,7 @@ | |||
add_executable(podio-dump-cpp src/podio-dump.cpp) | |||
target_link_libraries(podio-dump-cpp PRIVATE podio::podio podio::podioIO fmt::fmt) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Executable needs to be installed.
tmadlener
commented
Jun 7, 2024
I wonder how an RDataFrame-based python version (with pre-compiled functions) would fare on a performance vs. comfort scale |
tmadlener
force-pushed
the
podio-dump-cpp
branch
from
June 25, 2024 12:06
c7d24b2
to
6b34936
Compare
tmadlener
force-pushed
the
podio-dump-cpp
branch
from
December 3, 2024 16:39
6b34936
to
04b0bd2
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.
BEGINRELEASENOTES
podio-dump
in c++ to make dumping files quickerENDRELEASENOTES
This is an attempt at making
podio-dump
quicker after several complaints (e.g. key4hep/EDM4hep#312). After some "profiling" it turns out that the slowest part in the python implementation is the loop over all the collections which can be significantly sped up by going to c++. In my local timings the current (python based)podio-dump
is almost ten times slower than this (c++ based)podio-dump-cpp
) for dumping theexample_frame.root
file from the tests (times viatime
)podio-dump
podio-dump-cpp
The main disadvantages of the c++ implementation are that we need quite a bit of boilerplate for things that are trivial in python, e.g.:
tabulate
functionalityiostream
andiomanip
is bordering on masochism, I have decided to pull infmt
for now. In principle c++20 has similar functionality instd::format
(but nofmt::print
that only comes with c++26). However, that requires gcc >=13 and clang >= 16.podio/tools/podio-dump
Lines 99 to 100 in d275460
in c++ this would require at least one other library to be pulled in
Since dumping the datamodel would require quite a bit of work in c++, I would be in favor of keeping that in python in a separate tool, while the other functionality could be covered by the c++ implementation.
TODO: