[Bug libstdc++/98226] Slow std::countr_one

2021-03-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #14 from CVS Commits --- The releases/gcc-10 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:d7216ea6c0cd6c4fef06e9501bd630c3161b14fd commit r10-9576-gd7216ea6c0cd6c4fef06e9501bd630c3161b14fd Author: Jonathan

[Bug libstdc++/98226] Slow std::countr_one

2020-12-11 Thread zaikin.icc at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 Oleg Zaikin changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug libstdc++/98226] Slow std::countr_one

2020-12-11 Thread zaikin.icc at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #12 from Oleg Zaikin --- (In reply to Alexander Monakov from comment #10) > But why you are trying to use a more complex branchy expression in C++17 > mode when you already have a more efficient expression as a "fallback"? > > Note

[Bug libstdc++/98226] Slow std::countr_one

2020-12-11 Thread zaikin.icc at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #11 from Oleg Zaikin --- (In reply to Jonathan Wakely from comment #8) > That needs to be investigated, but it's a problem with the compiler. It has > nothing to do with countr_one being implemented using countr_zero (as shown > by

[Bug libstdc++/98226] Slow std::countr_one

2020-12-11 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org ---

[Bug libstdc++/98226] Slow std::countr_one

2020-12-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #9 from Jonathan Wakely --- The generated code hasn't changed between gcc-10 and gcc-11 though, so the difference must be in the code used to run the benchmarks, not the code under test. See https://godbolt.org/z/bWeMen

[Bug libstdc++/98226] Slow std::countr_one

2020-12-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #8 from Jonathan Wakely --- (In reply to Oleg Zaikin from comment #6) > When we switched from C++17-based g++ to C++20-based g++, the performance of > the whole program decreased by about 7 %. It turned out that the main reason > is

[Bug libstdc++/98226] Slow std::countr_one

2020-12-11 Thread zaikin.icc at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #7 from Oleg Zaikin --- (In reply to Jonathan Wakely from comment #5) > I've removed some redundant code from them, but not changed the indirection > that this PR complains about. I don't plan to change that. Thank you! I've got

[Bug libstdc++/98226] Slow std::countr_one

2020-12-11 Thread zaikin.icc at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #6 from Oleg Zaikin --- (In reply to Jonathan Wakely from comment #2) > Oh, but you didn't enable any optimization at all, so who cares about the > performance? Let me give the whole picture. The issue is very close to that from

[Bug libstdc++/98226] Slow std::countr_one

2020-12-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #5 from Jonathan Wakely --- I've removed some redundant code from them, but not changed the indirection that this PR complains about. I don't plan to change that.

[Bug libstdc++/98226] Slow std::countr_one

2020-12-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #4 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:2ea62857a3fbdf091ba38cbb62e98dc76b198e2e commit r11-5922-g2ea62857a3fbdf091ba38cbb62e98dc76b198e2e Author: Jonathan Wakely Date:

[Bug libstdc++/98226] Slow std::countr_one

2020-12-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #3 from Andrew Pinski --- (In reply to Jonathan Wakely from comment #2) > Oh, but you didn't enable any optimization at all, so who cares about the > performance? I was thinking the same.

[Bug libstdc++/98226] Slow std::countr_one

2020-12-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #2 from Jonathan Wakely --- Oh, but you didn't enable any optimization at all, so who cares about the performance?

[Bug libstdc++/98226] Slow std::countr_one

2020-12-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98226 --- Comment #1 from Jonathan Wakely --- This seems like an optimizer bug. There is no way I'm going to repeat the entire body of countr_zero in countr_one.