Jim Gettys wrote:
> I'm worried about the fact that Cairo likes to do things 32 bits
> and they then have to be converted and composited at 16 bits;

Here are results of two runs of the cairo's performance test suite, at 16 and
24 bpp.  Test hardware is a B4, xserver-1.4-branch, cairo 1.4.10.  This time
24 bpp is overall better.
Only cairo_paint() is slower at 24, but not cairo_paint_with_alpha(), which is
actually a lot faster.

I oprofiled the whole runs, but haven't found significant differences between
16 and 24 bpp.  Probably a profiling of the single tests could be more useful.

Output of cairo-perf-diff (nicer html format attached):

old: cairo-perf-16
new: cairo-perf-24
Speedups
========
 xlib-rgb  paint-with-alpha_similar_rgb_over-512  192.24 0.06% ->  47.68 0.16%: 
 4.04x speedup
███
 xlib-rgb  paint-with-alpha_similar_rgb_over-256   48.51 0.14% ->  12.39 0.56%: 
 3.95x speedup
███
 xlib-rgb  paint-with-alpha_image_rgb_over-256   63.25 0.26% ->  29.27 0.51%:  
2.17x speedup
█▏
 xlib-rgb  paint-with-alpha_image_rgb_over-512  250.25 1.01% -> 122.63 2.40%:  
2.09x speedup
█▏
 xlib-rgb  paint-with-alpha_similar_rgba_over-512  180.26 0.08% ->  86.75 
0.10%:  2.08x speedup
█▏
 xlib-rgb  paint-with-alpha_similar_rgba_over-256   45.66 0.13% ->  22.17 
0.34%:  2.07x speedup
█▏
 xlib-rgb       fill_similar_rgb_over-256   16.43 0.52% ->   9.66 0.95%:  1.71x 
speedup
▊
 xlib-rgb  paint-with-alpha_image_rgba_over-256   62.87 0.34% ->  39.25 0.48%:  
1.61x speedup
▋
 xlib-rgb  paint-with-alpha_image_rgba_over-512  248.95 0.32% -> 159.74 0.45%:  
1.56x speedup
▋
 xlib-rgb     stroke_similar_rgb_over-256   37.00 0.26% ->  25.80 0.40%:  1.44x 
speedup
▌
 xlib-rgb       fill_similar_rgb_over-128    5.71 1.08% ->   4.05 1.88%:  1.42x 
speedup
▍
 xlib-rgb      fill_similar_rgba_over-256   17.66 0.52% ->  12.71 0.61%:  1.40x 
speedup
▍
 xlib-rgb  paint-with-alpha_linear_rgb_over-256   88.94 0.21% ->  65.39 0.27%:  
1.36x speedup
▍
 xlib-rgb  paint-with-alpha_linear_rgba_over-256   88.53 0.24% ->  64.95 0.26%: 
 1.36x speedup
▍
 xlib-rgb  paint-with-alpha_linear_rgb_over-512  354.73 0.19% -> 265.89 0.47%:  
1.34x speedup
▍
 xlib-rgb  paint-with-alpha_linear_rgba_over-512  352.53 0.24% -> 264.01 0.46%: 
 1.34x speedup
▍
 xlib-rgb         fill_image_rgb_over-256   24.06 0.52% ->  18.41 0.62%:  1.31x 
speedup
▍
 xlib-rgb    stroke_similar_rgba_over-256   37.82 0.26% ->  29.30 0.33%:  1.30x 
speedup
▎
 xlib-rgb      fill_similar_rgba_over-128    6.06 0.50% ->   4.82 1.58%:  1.29x 
speedup
▎
 xlib-rgb        fill_image_rgba_over-256   26.38 0.46% ->  21.45 0.44%:  1.23x 
speedup
▎
 xlib-rgb     stroke_similar_rgb_over-128   15.97 0.47% ->  13.26 0.59%:  1.21x 
speedup
▎
 xlib-rgb       stroke_image_rgb_over-256   49.07 0.24% ->  41.01 0.32%:  1.20x 
speedup
▎
 xlib-rgb        fill_linear_rgb_over-256   35.22 0.31% ->  29.54 0.37%:  1.19x 
speedup
▎
 xlib-rgb  paint-with-alpha_radial_rgb_over-256  156.75 0.35% -> 133.54 0.14%:  
1.17x speedup
▏
 xlib-rgb  paint-with-alpha_radial_rgb_over-512  627.70 0.15% -> 539.14 0.23%:  
1.17x speedup
▏
 xlib-rgb       fill_similar_rgb_over-64     3.26 2.03% ->   2.80 2.55%:  1.16x 
speedup
▏
 xlib-rgb  paint-with-alpha_radial_rgba_over-256  152.81 0.36% -> 132.55 0.78%: 
 1.16x speedup
▏
 xlib-rgb      stroke_image_rgba_over-256   51.60 0.22% ->  44.51 0.35%:  1.16x 
speedup
▏
 xlib-rgb    stroke_similar_rgba_over-128   16.21 0.49% ->  14.10 0.46%:  1.15x 
speedup
▏
 xlib-rgb         fill_image_rgb_over-128    8.01 0.79% ->   6.92 0.62%:  1.15x 
speedup
▏
 xlib-rgb      stroke_linear_rgb_over-256   67.40 0.22% ->  58.75 0.28%:  1.15x 
speedup
▏
 xlib-rgb  paint-with-alpha_radial_rgba_over-512  611.50 0.18% -> 536.93 0.32%: 
 1.14x speedup
▏
 xlib-rgb     fill_similar_rgb_source-256   31.79 0.26% ->  27.98 0.22%:  1.14x 
speedup
▏
 xlib-rgb  paint-with-alpha_similar_rgb_source-512  306.70 0.07% -> 270.02 
0.08%:  1.14x speedup
▏
 xlib-rgb  paint-with-alpha_similar_rgb_source-256   77.35 0.12% ->  68.40 
0.19%:  1.13x speedup
▏
 xlib-rgb        fill_linear_rgb_over-128   10.86 0.73% ->   9.69 0.84%:  1.12x 
speedup
▏
 xlib-rgb   stroke_similar_rgb_source-256   62.25 0.14% ->  55.66 0.20%:  1.12x 
speedup
▏
 xlib-rgb        fill_image_rgba_over-128    8.54 0.66% ->   7.66 0.62%:  1.12x 
speedup
▏
 xlib-rgb       fill_linear_rgba_over-256   40.03 0.27% ->  35.93 0.31%:  1.12x 
speedup
▏
 xlib-rgb       stroke_image_rgb_over-128   19.33 0.44% ->  17.38 0.53%:  1.11x 
speedup
▏
 xlib-rgb      fill_similar_rgba_over-64     3.32 2.15% ->   2.99 2.47%:  1.11x 
speedup
▏
 xlib-rgb  paint-with-alpha_solid_rgba_source-512  157.75 0.14% -> 142.45 
0.13%:  1.11x speedup
▏
 xlib-rgb  paint-with-alpha_solid_rgb_source-512  157.67 0.13% -> 142.39 0.13%: 
 1.11x speedup
▏
 xlib-rgb  paint-with-alpha_solid_rgba_source-256   39.69 0.24% ->  35.98 
0.29%:  1.10x speedup
▏
 xlib-rgb    fill_similar_rgba_source-256   30.51 0.28% ->  27.70 0.25%:  1.10x 
speedup
▏
 xlib-rgb     fill_similar_rgb_source-128    9.92 0.82% ->   9.00 0.92%:  1.10x 
speedup
▏
 xlib-rgb  paint-with-alpha_solid_rgb_source-256   39.65 0.27% ->  35.99 0.27%: 
 1.10x speedup
▏
 xlib-rgb     stroke_linear_rgba_over-256   72.97 0.20% ->  66.24 0.25%:  1.10x 
speedup
▏
 xlib-rgb  paint-with-alpha_similar_rgba_source-512  294.87 0.07% -> 267.69 
0.09%:  1.10x speedup
▏
 xlib-rgb      stroke_image_rgba_over-128   19.99 0.40% ->  18.20 0.48%:  1.10x 
speedup
▏
 xlib-rgb  paint-with-alpha_similar_rgba_source-256   74.51 0.13% ->  67.82 
0.17%:  1.10x speedup
▏
 xlib-rgb      stroke_linear_rgb_over-128   24.13 0.42% ->  21.94 0.38%:  1.10x 
speedup
▏
 xlib-rgb       text_similar_rgb_over-128   29.20 0.32% ->  26.55 0.32%:  1.10x 
speedup
▏
 xlib-rgb        fill_radial_rgb_over-256   65.88 0.16% ->  60.23 0.19%:  1.09x 
speedup
▏
 xlib-rgb      text_similar_rgba_over-128   28.60 0.30% ->  26.33 0.48%:  1.09x 
speedup
▏
 xlib-rgb  stroke_similar_rgba_source-256   60.13 0.18% ->  55.29 0.20%:  1.09x 
speedup
▏
 xlib-rgb       text_similar_rgb_over-256  121.24 0.12% -> 111.58 0.11%:  1.09x 
speedup
▏
 xlib-rgb       fill_solid_rgb_source-256   20.40 0.27% ->  18.94 0.45%:  1.08x 
speedup
▏
 xlib-rgb      fill_solid_rgba_source-256   20.40 0.23% ->  18.94 0.42%:  1.08x 
speedup
▏
 xlib-rgb  paint-with-alpha_image_rgb_source-256   92.37 0.22% ->  85.41 0.26%: 
 1.08x speedup
▏
 xlib-rgb       text_similar_rgb_over-64    10.19 0.88% ->   9.43 0.89%:  1.08x 
speedup
▏
 xlib-rgb         fill_image_rgb_over-64     4.14 1.78% ->   3.84 2.04%:  1.08x 
speedup
▏
 xlib-rgb    fill_similar_rgba_source-128    9.68 0.87% ->   8.94 0.89%:  1.08x 
speedup
▏
 xlib-rgb  paint-with-alpha_image_rgba_source-256   92.08 0.25% ->  85.10 
0.24%:  1.08x speedup
▏
 xlib-rgb   stroke_similar_rgb_source-128   22.22 0.32% ->  20.61 0.36%:  1.08x 
speedup
▏
 xlib-rgb      stroke_radial_rgb_over-256  118.60 0.13% -> 109.90 0.15%:  1.08x 
speedup
▏
 xlib-rgb       fill_linear_rgba_over-128   12.06 0.46% ->  11.26 0.81%:  1.08x 
speedup
▏
 xlib-rgb      fill_image_rgba_source-256   39.47 0.26% ->  36.77 0.32%:  1.07x 
speedup
▏
 xlib-rgb      text_similar_rgba_over-256  118.97 0.09% -> 110.89 0.10%:  1.07x 
speedup
▏
 xlib-rgb     stroke_linear_rgba_over-128   25.47 0.48% ->  23.75 0.44%:  1.07x 
speedup
▏
 xlib-rgb       fill_image_rgb_source-256   39.70 0.30% ->  36.97 0.28%:  1.07x 
speedup
▏
 xlib-rgb    stroke_image_rgba_source-256   74.72 0.21% ->  69.78 0.15%:  1.07x 
speedup
▏
 xlib-rgb        fill_radial_rgb_over-128   18.49 0.48% ->  17.33 0.54%:  1.07x 
speedup
▏
 xlib-rgb     stroke_image_rgb_source-256   74.97 0.18% ->  70.13 0.15%:  1.07x 
speedup
▏
 xlib-rgb  paint-with-alpha_image_rgba_source-512  363.50 0.17% -> 341.13 
0.22%:  1.07x speedup
▏
 xlib-rgb     stroke_similar_rgb_over-64    10.08 0.80% ->   9.44 0.78%:  1.07x 
speedup
▏
 xlib-rgb        fill_image_rgba_over-64     4.27 1.67% ->   4.04 1.86%:  1.06x 
speedup
▏
 xlib-rgb  paint-with-alpha_image_rgb_source-512  364.69 0.73% -> 345.91 0.76%: 
 1.06x speedup
▏
 xlib-rgb      stroke_radial_rgb_over-128   37.08 0.21% ->  34.93 0.23%:  1.06x 
speedup
▏
 xlib-rgb      text_similar_rgba_over-64    10.07 0.85% ->   9.45 0.91%:  1.06x 
speedup
▏
 xlib-rgb  paint-with-alpha_linear_rgba_source-256  117.73 0.18% -> 110.79 
0.23%:  1.06x speedup
▏
 xlib-rgb  paint-with-alpha_linear_rgb_source-256  118.14 0.20% -> 111.24 
0.17%:  1.06x speedup

 xlib-rgb       fill_radial_rgba_over-256   70.67 0.14% ->  66.64 0.17%:  1.06x 
speedup

 xlib-rgb    stroke_solid_rgba_source-256   43.48 0.21% ->  41.03 0.24%:  1.06x 
speedup

 xlib-rgb      fill_linear_rgb_source-256   50.82 0.19% ->  48.14 0.31%:  1.06x 
speedup

 xlib-rgb     fill_similar_rgb_source-64     4.62 1.52% ->   4.37 1.51%:  1.06x 
speedup

 xlib-rgb     stroke_solid_rgb_source-256   43.52 0.22% ->  41.17 0.27%:  1.06x 
speedup

 xlib-rgb  stroke_similar_rgba_source-128   21.70 0.36% ->  20.51 0.32%:  1.06x 
speedup

 xlib-rgb      fill_solid_rgba_source-128    6.93 0.56% ->   6.58 0.66%:  1.06x 
speedup

 xlib-rgb     stroke_radial_rgba_over-256  124.03 0.10% -> 117.34 0.14%:  1.06x 
speedup

 xlib-rgb     fill_linear_rgba_source-256   50.61 0.21% ->  47.87 0.23%:  1.06x 
speedup

 xlib-rgb        fill_linear_rgb_over-64     5.00 1.33% ->   4.75 1.44%:  1.06x 
speedup

 xlib-rgb     text_similar_rgb_source-256  143.07 0.08% -> 135.86 0.10%:  1.05x 
speedup

 xlib-rgb         text_image_rgb_over-128   37.06 0.33% ->  35.10 0.25%:  1.05x 
speedup

 xlib-rgb       fill_solid_rgb_source-128    6.88 0.85% ->   6.55 0.94%:  1.05x 
speedup

 xlib-rgb        text_image_rgba_over-128   36.74 0.35% ->  34.90 0.23%:  1.05x 
speedup

 xlib-rgb        text_image_rgba_over-256  153.64 0.10% -> 145.93 0.11%:  1.05x 
speedup

 xlib-rgb  paint-with-alpha_linear_rgba_source-512  467.52 0.19% -> 445.07 
0.27%:  1.05x speedup

 xlib-rgb  paint-with-alpha_linear_rgb_source-512  469.26 0.19% -> 446.00 
0.24%:  1.05x speedup

 xlib-rgb         text_image_rgb_over-256  153.96 0.13% -> 146.48 0.12%:  1.05x 
speedup

Slowdowns
=========
 xlib-rgb      paint_similar_rgb_over-512    1.93 0.54% ->   3.76 0.45%:  1.94x 
slowdown
█
 xlib-rgb    paint_similar_rgb_source-512    1.93 0.62% ->   3.76 0.36%:  1.94x 
slowdown
█
 xlib-rgb   paint_similar_rgba_source-512    2.07 0.62% ->   3.77 0.51%:  1.83x 
slowdown
▉
 xlib-rgb     paint_solid_rgba_source-512    0.86 0.59% ->   1.48 0.48%:  1.72x 
slowdown
▊
 xlib-rgb        paint_solid_rgb_over-512    0.87 0.82% ->   1.49 0.57%:  1.71x 
slowdown
▊
 xlib-rgb      paint_solid_rgb_source-512    0.87 0.58% ->   1.49 0.63%:  1.71x 
slowdown
▊
 xlib-rgb    paint_similar_rgb_source-256    0.71 0.77% ->   1.18 0.41%:  1.69x 
slowdown
▊
 xlib-rgb      paint_similar_rgb_over-256    0.71 0.72% ->   1.18 0.47%:  1.68x 
slowdown
▋
 xlib-rgb     paint_similar_rgba_over-512    2.73 0.58% ->   4.47 0.42%:  1.65x 
slowdown
▋
 xlib-rgb   paint_similar_rgba_source-256    0.76 0.76% ->   1.20 0.55%:  1.58x 
slowdown
▋
 xlib-rgb     paint_similar_rgba_over-256    0.93 0.56% ->   1.38 0.65%:  1.48x 
slowdown
▌
 xlib-rgb        paint_solid_rgb_over-256    0.44 0.70% ->   0.60 0.59%:  1.37x 
slowdown
▍
 xlib-rgb     paint_solid_rgba_source-256    0.44 0.87% ->   0.60 0.83%:  1.36x 
slowdown
▍
 xlib-rgb      paint_solid_rgb_source-256    0.45 0.77% ->   0.60 0.83%:  1.35x 
slowdown
▍
 xlib-rgb        paint_image_rgb_over-512   22.61 2.55% ->  25.95 2.29%:  1.19x 
slowdown
▎
 xlib-rgb      paint_image_rgb_source-512   22.59 2.55% ->  25.97 2.34%:  1.17x 
slowdown
▏
 xlib-rgb     paint_image_rgba_source-512   22.79 2.71% ->  25.86 2.33%:  1.17x 
slowdown
▏
 xlib-rgb       paint_image_rgba_over-512   23.43 2.43% ->  26.58 2.21%:  1.16x 
slowdown
▏
 xlib-rgb     paint_image_rgba_source-256    6.48 3.21% ->   7.17 2.23%:  1.14x 
slowdown
▏
 xlib-rgb        paint_image_rgb_over-256    6.43 2.47% ->   7.07 2.03%:  1.13x 
slowdown
▏
 xlib-rgb       paint_image_rgba_over-256    6.61 3.03% ->   7.41 2.43%:  1.11x 
slowdown
▏
 xlib-rgb      paint_image_rgb_source-256    6.44 2.82% ->   7.08 2.25%:  1.11x 
slowdown
▏
Title: Performance Changes

16bpp->24bpp Performance Changes

xlib-rgb

  64 128 256 512
fill_image_rgb_over 1.08x ☺ 1.15x ☺ 1.31x ☺  
fill_image_rgb_source     1.07x ☺  
fill_image_rgba_over 1.06x ☺ 1.12x ☺ 1.23x ☺  
fill_image_rgba_source     1.07x ☺  
fill_linear_rgb_over 1.06x ☺ 1.12x ☺ 1.19x ☺  
fill_linear_rgb_source     1.06x ☺  
fill_linear_rgba_over   1.08x ☺ 1.12x ☺  
fill_linear_rgba_source     1.06x ☺  
fill_radial_rgb_over   1.07x ☺ 1.09x ☺  
fill_radial_rgba_over     1.06x ☺  
fill_similar_rgb_over 1.16x ☺ 1.42x ☺ 1.71x ☺  
fill_similar_rgb_source 1.06x ☺ 1.10x ☺ 1.14x ☺  
fill_similar_rgba_over 1.11x ☺ 1.29x ☺ 1.40x ☺  
fill_similar_rgba_source   1.08x ☺ 1.10x ☺  
fill_solid_rgb_source   1.05x ☺ 1.08x ☺  
fill_solid_rgba_source   1.06x ☺ 1.08x ☺  
paint-with-alpha_image_rgb_over     2.17x ☺ 2.09x ☺
paint-with-alpha_image_rgb_source     1.08x ☺ 1.06x ☺
paint-with-alpha_image_rgba_over     1.61x ☺ 1.56x ☺
paint-with-alpha_image_rgba_source     1.08x ☺ 1.07x ☺
paint-with-alpha_linear_rgb_over     1.36x ☺ 1.34x ☺
paint-with-alpha_linear_rgb_source     1.06x ☺ 1.05x ☺
paint-with-alpha_linear_rgba_over     1.36x ☺ 1.34x ☺
paint-with-alpha_linear_rgba_source     1.06x ☺ 1.05x ☺
paint-with-alpha_radial_rgb_over     1.17x ☺ 1.17x ☺
paint-with-alpha_radial_rgba_over     1.16x ☺ 1.14x ☺
paint-with-alpha_similar_rgb_over     3.95x ☺ 4.04x ☺
paint-with-alpha_similar_rgb_source     1.13x ☺ 1.14x ☺
paint-with-alpha_similar_rgba_over     2.07x ☺ 2.08x ☺
paint-with-alpha_similar_rgba_source     1.10x ☺ 1.10x ☺
paint-with-alpha_solid_rgb_source     1.10x ☺ 1.11x ☺
paint-with-alpha_solid_rgba_source     1.10x ☺ 1.11x ☺
paint_image_rgb_over     1.13x ☹ 1.19x ☹
paint_image_rgb_source     1.11x ☹ 1.17x ☹
paint_image_rgba_over     1.11x ☹ 1.16x ☹
paint_image_rgba_source     1.14x ☹ 1.17x ☹
paint_similar_rgb_over     1.68x ☹ 1.94x ☹
paint_similar_rgb_source     1.69x ☹ 1.94x ☹
paint_similar_rgba_over     1.48x ☹ 1.65x ☹
paint_similar_rgba_source     1.58x ☹ 1.83x ☹
paint_solid_rgb_over     1.37x ☹ 1.71x ☹
paint_solid_rgb_source     1.35x ☹ 1.71x ☹
paint_solid_rgba_source     1.36x ☹ 1.72x ☹
stroke_image_rgb_over   1.11x ☺ 1.20x ☺  
stroke_image_rgb_source     1.07x ☺  
stroke_image_rgba_over   1.10x ☺ 1.16x ☺  
stroke_image_rgba_source     1.07x ☺  
stroke_linear_rgb_over   1.10x ☺ 1.15x ☺  
stroke_linear_rgba_over   1.07x ☺ 1.10x ☺  
stroke_radial_rgb_over   1.06x ☺ 1.08x ☺  
stroke_radial_rgba_over     1.06x ☺  
stroke_similar_rgb_over 1.07x ☺ 1.21x ☺ 1.44x ☺  
stroke_similar_rgb_source   1.08x ☺ 1.12x ☺  
stroke_similar_rgba_over   1.15x ☺ 1.30x ☺  
stroke_similar_rgba_source   1.06x ☺ 1.09x ☺  
stroke_solid_rgb_source     1.06x ☺  
stroke_solid_rgba_source     1.06x ☺  
text_image_rgb_over   1.05x ☺ 1.05x ☺  
text_image_rgba_over   1.05x ☺ 1.05x ☺  
text_similar_rgb_over 1.08x ☺ 1.10x ☺ 1.09x ☺  
text_similar_rgb_source     1.05x ☺  
text_similar_rgba_over 1.06x ☺ 1.09x ☺ 1.07x ☺  
_______________________________________________
Devel mailing list
[email protected]
http://lists.laptop.org/listinfo/devel

Reply via email to