On Tue, Jul 6, 2010 at 1:59 PM, Aaron Plattner <[email protected]> wrote: > On Tue, Jul 06, 2010 at 09:56:51AM -0700, Jamey Sharp wrote: >> That requires not using ValidateGC to select GC ops. > > This sounds bad. GC ops are simple enough that every bit of validation > overhead causes significant performance regressions. Pierre-Loup did an > experiment recently that showed that moving validation from ValidateGC to > the ops cost 5% on lines.
Pierre-Loup got that result using `x11perf -seg1`. 1-pixel "lines" are certainly going to show performance changes worse than most any other test, so I think this conclusion is backwards: This change causes a mere 5% performance hit in the worst case? That's almost measurement noise. He said the test was a quick hack. Of course, the code is closed-source, so I can't review or duplicate the experiment, but I'd guess a more polished refactoring would have even less performance impact. He left IRC abruptly after reporting these results so I couldn't find out more. As counter-evidence I'll point out that no open source driver resorts to these tricks for performance, as far as I can tell. My guess is that function pointers are worse on modern out-of-order CPUs than conditional branches, and so I hypothesize that if you do a complete conversion to eliminate validation-time ops selection you'll see little performance change. I'd expect your code to be quite a bit easier to understand and maintain, too. I hope the effort involved will be further justified by the ability to eliminate Xinerama, hotplug screens, and make other improvements. Jamey _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
