Bug 66004 - [12/13/14/15 Regression]: performance of 26_numerics/random/negative_binomial_distribution/operators/values.cc
Summary: [12/13/14/15 Regression]: performance of 26_numerics/random/negative_binomial...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: ipa (show other bugs)
Version: 6.0
: P4 normal
Target Milestone: 12.5
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2015-05-04 12:46 UTC by Hans-Peter Nilsson
Modified: 2024-07-19 12:57 UTC (History)
1 user (show)

See Also:
Host: x86_64-linux-gnu
Target: cris-elf
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-06-27 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2015-05-04 12:46:13 UTC
For r221618, this test took 34633750695 "basic clock cycles" in the CRIS simulator.  For r222742 (aka. "now"), it takes 40111446541 (same unit).  This is a performance regression of about 16% in less than 1.5 month!  I noticed because the test started to fail on my autotester machine during times of load, when it has been previously silent.  The cris-elf is a 32-bit soft-float target.

Note that the situation is the opposite of that in PR65093.

I'm listing the libstdc++ component as the cause, will update as my (low-intensity) investigation (which I guess will be mostly bisecting) continues.  It is also a likely culprit, with the recent work alluded to in PR65093 (either further work or another side of the coin, of changes there improving performance).

My first reaction, before checking for regression, was the test can and should be split up as in PR65093.  I still think it should, after the regression is fixed.

(Revision r221618 happens to be the last regression-free revision for cris-elf; after that no components outside the gcc repo have been updated.)

Relative performance numbers for other platforms at svn revisions near those above would be interesting.
Comment 1 Hans-Peter Nilsson 2015-05-04 17:19:56 UTC
At r222180: 40068917595
Comment 2 Hans-Peter Nilsson 2015-05-06 04:47:45 UTC
Bisecting shows that revision r221859 is the culprit, adding Honza to CC.

I hope to add analysis of the compiled code showing (an example of) the regressed code, but it would be really nice if Someone could performance-regression test r221859 (compared to r221858) on another target.

Weird that a performance-regression of 16% is supposed to be *fixed* by that commit (see PR65076). While it refers to *compile-time* regression, that is just another name for a *run-time* performance-regression of the bootstrapped compiler, apparently typical for at least the execution-path when compiling tramp3d-v4.cpp supposedly for x86_64-linux and 26_numerics/random/negative_binomial_distribution/operators/values.cc for cris-elf.

Note that the regression is not fixed for cris-elf at r222305 (a later additional commit referencing PR65076).

Revision-numbers and cycle numbers while bisecting follows. Note the very stable numbers:

r221618 34633750695
r221758 34633750695
r221828 34633750695
r221845 34633750695
r221854 34633750695
r221858 34633750695
r221859 40068917595
r221860 40068917595
r221863 40068917595
r221899 40068917595
r222180 40068917595
r222742 40111446541
Comment 3 Hans-Peter Nilsson 2015-05-16 01:04:52 UTC
Something supposedly very good happened recently, because:
r223225 18369501023

I'll just have to find out what caused that 50% cut!  The test-case is unchanged.
If the cause is related to inlining heuristics, I'll close this PR for sure.
Comment 4 Hans-Peter Nilsson 2015-05-17 11:49:18 UTC
(In reply to Hans-Peter Nilsson from comment #3)
> Something supposedly very good happened recently, because:
> r223225 18369501023
> 
> I'll just have to find out what caused that 50% cut!  The test-case is
> unchanged.
> If the cause is related to inlining heuristics, I'll close this PR for sure.

Ignore that.  I misobserved the "nearby" test-case 26_numerics/random/poisson_distribution/operators/values.cc probably because there was a test-run still in progress.  Still, that similar test-case indeed seems to have lower initialization numbers.  Lesson learned: always double-check your end-point observations before bisecting.
Comment 5 Hans-Peter Nilsson 2015-06-27 23:31:36 UTC
Things got from bad to worse:

r225090 40333375286
Comment 6 Jan Hubicka 2015-12-03 05:21:30 UTC
HP, I think I need bit more analysis here.  Do you know what inline decision actually causes the trouble?
Comment 7 Hans-Peter Nilsson 2015-12-08 03:19:34 UTC
(In reply to Jan Hubicka from comment #6)
> HP, I think I need bit more analysis here.  Do you know what inline decision
> actually causes the trouble?

Um, no.  I have barely even tracked regression, much less got around to a useful investigation of what in r66004 caused the regression.  I usually have a build tree around and can do the typing if you tell what dump-file or somesuch you want?
(Though I'm not sure that it's just the single test-file; I should verify that first.)

While I'm here, let me log recent results.  Not getting better. :-(

r231343: 42688158156
Comment 8 Jakub Jelinek 2016-04-27 10:57:49 UTC
GCC 6.1 has been released.
Comment 9 Richard Biener 2016-08-22 08:59:33 UTC
GCC 6.2 is being released, adjusting target milestone.
Comment 10 Richard Biener 2016-08-22 09:00:35 UTC
GCC 6.2 is being released, adjusting target milestone.
Comment 11 Richard Biener 2016-08-22 09:13:13 UTC
GCC 6.2 is being released, adjusting target milestone.
Comment 12 Richard Biener 2016-08-22 09:14:26 UTC
GCC 6.2 is being released, adjusting target milestone.
Comment 13 Jakub Jelinek 2016-12-21 10:57:55 UTC
GCC 6.3 is being released, adjusting target milestone.
Comment 14 Richard Biener 2017-07-04 08:47:44 UTC
GCC 6.4 is being released, adjusting target milestone.
Comment 15 Jakub Jelinek 2018-10-26 10:21:29 UTC
GCC 6 branch is being closed
Comment 16 Richard Biener 2019-11-14 07:56:54 UTC
The GCC 7 branch is being closed, re-targeting to GCC 8.4.
Comment 17 Jakub Jelinek 2020-03-04 09:38:14 UTC
GCC 8.4.0 has been released, adjusting target milestone.
Comment 18 Jakub Jelinek 2021-05-14 09:47:41 UTC
GCC 8 branch is being closed.
Comment 19 Richard Biener 2021-06-01 08:06:52 UTC
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
Comment 20 Richard Biener 2022-05-27 09:35:42 UTC
GCC 9 branch is being closed
Comment 21 Jakub Jelinek 2022-06-28 10:31:33 UTC
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
Comment 22 Richard Biener 2023-07-07 10:30:48 UTC
GCC 10 branch is being closed.
Comment 23 Richard Biener 2024-07-19 12:57:56 UTC
GCC 11 branch is being closed.