I think this is basically the same issue as bug 4379. Each optimiser pass can only remove ONE comma expression -- but the entire expression gets traversed each time.
So, the optimisation time is O(n^^2) where n = depth of comma expressions.
Comment #2 by schveiguy — 2011-03-03T06:24:54Z
Bug 4900 could also be related.
I would recommend profiling the compiler to see what functions it is spending the most time in. It's not a simple thing, but the makefile has (or at least had) some commented out flags that should do the trick.
Comment #3 by yebblies — 2012-02-01T06:26:32Z
*** This issue has been marked as a duplicate of issue 2396 ***