GNOME Bugzilla – Bug 759616
Performance test for gegl:translate fast paths
Last modified: 2016-01-05 15:09:25 UTC
Let's write a performance test for gegl:translate to stress the integer translation and NEAREST sampler fast paths. On my i7, if the fast paths are working as expected I see a throughput of more than 8000 megabytes/second. Otherwise (eg., with bugs like 758534) they can drop to 1300 to 1400 megabytes/second.
Created attachment 317607 [details] [review] perf: Test gegl:translate fast paths
Created attachment 317608 [details] [review] perf: Test gegl:translate fast paths Expand a bit on why a "R'G'B' u8" buffer was chosen.
Created attachment 317954 [details] [review] perf: Test gegl:translate fast paths Clarify the performance figures a bit more, and use a better name for the integer translation test.
commit 171e1b9d3204829069ade6aa9fba248a107387d6 Author: Debarshi Ray <debarshir@gnome.org> Date: Fri Dec 18 07:10:31 2015 +0100 perf: Test gegl:translate fast paths A "R'G'B' u8" buffer nicely demonstrates all the aspects of the fast paths - the buffer shifting trick and avoiding Babl format conversions. eg., on a Intel Core i7 it gives a throughput of more than 8000 MB/s, and if (needless) Babl conversions are introduced it drops to 1300 to 1400 MB/s. On the other hand, a "RGBA float" buffer always performs at 1200 to 1300 MB/s, whether we avoid the Babl conversions or not. Presumably, this is because converting "RGBA float" pixels to "RaGaBaA float" is as fast as a NOP. (The general fall in performance of "RGBA float" buffers is simply because they have more bytes than their "R'G'B' u8" counterparts.) https://bugzilla.gnome.org/show_bug.cgi?id=759616