Skip to content

[metacling] Switch default cling optimization for ROOT to -O1.#9301

Merged
Axel-Naumann merged 1 commit intoroot-project:masterfrom
Axel-Naumann:tcling-O1
Nov 21, 2021
Merged

[metacling] Switch default cling optimization for ROOT to -O1.#9301
Axel-Naumann merged 1 commit intoroot-project:masterfrom
Axel-Naumann:tcling-O1

Conversation

@Axel-Naumann
Copy link
Copy Markdown
Member

This Pull request:

Changes or fixes:

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

This PR fixes #

@Axel-Naumann Axel-Naumann added this to the 6.26/00 milestone Nov 16, 2021
@Axel-Naumann Axel-Naumann self-assigned this Nov 16, 2021
@Axel-Naumann Axel-Naumann requested a review from pcanal as a code owner November 16, 2021 07:55
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

Copy link
Copy Markdown
Contributor

@eguiraud eguiraud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Axel-Naumann
Copy link
Copy Markdown
Member Author

@vgvassilev

User CPU time, 2nd run of all tests:

test opt non-opt
stressGeometry.cxx 20.10 19.36
stressHistogram.cxx 16.52 15.89
stressGraphics.cxx 57.68 16.13

stressGraphics generates code that's full of virtual function calls. This used to explode; a factor 4 is still terrible but given that this is on the "awkward" side of our legacy code likely a price we need to pay.

@vgvassilev
Copy link
Copy Markdown
Member

@vgvassilev

User CPU time, 2nd run of all tests:
test opt non-opt
stressGeometry.cxx 20.10 19.36
stressHistogram.cxx 16.52 15.89
stressGraphics.cxx 57.68 16.13

stressGraphics generates code that's full of virtual function calls. This used to explode; a factor 4 is still terrible but given that this is on the "awkward" side of our legacy code likely a price we need to pay.

The question is how many tutorials and code such as stressGraphics.cxx we have, and more importantly how much of the experiments/users use that style of coding/interfaces.

@Axel-Naumann
Copy link
Copy Markdown
Member Author

I know the question, but I don't think anyone knows the answer. The code that gets slowed down is vtable-heavy code (at least I think that's the symptom), i.e. "legacy" code. We need to motivate people to migrate to today's code, so that's what we should be optimize for. We are not making legacy code impossible, but we are indeed pessimizing it. I'd be happy :-) to have someone with opt knowledge figure out which pass it is that blows up. Maybe @hahnjo could give us a hand?

@Axel-Naumann
Copy link
Copy Markdown
Member Author

@vgvassilev do you object to me merging? I'd want to see this exposed to users earlier rather than later, to hear feedback before we tag v6.26. I have opened an issue #9312 to keep track.

@vgvassilev
Copy link
Copy Markdown
Member

@vgvassilev do you object to me merging? I'd want to see this exposed to users earlier rather than later, to hear feedback before we tag v6.26. I have opened an issue #9312 to keep track.

No objections. What I'd like to understand is how much code regressed. But also, is the performance benefit significant outside of RDF. Both probably require more field testing...

I suspect that for many cases we will be okay. There will be a number of regressed cases. What is unclear is how many are going to be the significantly improved cases. I believe for RDF we control the environment and compile even with -O2.

@Axel-Naumann Axel-Naumann merged commit eff25e5 into root-project:master Nov 21, 2021
@Axel-Naumann Axel-Naumann deleted the tcling-O1 branch November 21, 2021 19:34
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.

4 participants