printf usage in performance critical functions
- Dominant language
- C++
- Stars
- 39
- Forks
- 22
- Avg merge
- 10h 22m
- Merged PRs (30d)
- 3
Description
We should avoid variadic printf calls in important functions that get called a lot. Even if the branch does not get taken that invokes the printf, the performance will be degraded due to lower occupancy (and maybe other things?).
An example is the printfs in https://github.com/lanl/singularity-eos/blob/main/singularity-utils/singularity-utils/root-finding-1d/root_finding.hpp
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with singularity-utils/singularity-utils/root-finding-1d/root_finding.hpp and inspect the referenced printf calls in frequently invoked functions. Identify other important functions with the same variadic printf usage, then determine how to avoid the performance cost while preserving needed diagnostics. Done means the relevant performance-critical paths no longer use these calls without changing their intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100