Re: [AD] Optimized blitting between color depths

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, 2004-11-01 at 01:00 +0100, Sven Sandberg wrote:

> Just to be sure: did you did you link my program twice, against 
> different versions of Allegro? The numbers that my program prints are 

Well, I didn't even bother trying the shared version, but used static
linking:

-rwxr-xr-x   1 elias elias 691485 2004-10-31 20:54 dither-test-cvs
-rwxr-xr-x   1 elias elias 703614 2004-10-31 20:53 dither-test-patch

> not percents, but milliseconds, so you have to compute percents 
> manually. If you did that right, it's a bit strange. I should admit I 
> also got 1% slowdown for non-dithered, no keep trans -- I thought it was 
> within the error margin, but 7% sounds worse. The actual code for this 
> case is unchanged, except there is one `if' less in the new version 
> (compare the CONVERT_BLIT macro in the old version with the 'else' 
> branch of CONVERT_BLIT_EX in the new version). The only explanation I 
> can think of is bad luck with code alignment or something like that. 
> It's bad, because it's probably the most common case. I guess it would 
> be interesting to see what happens on other architectures too...
> 

Well, my values are the average % (from directly mangling your output
with a script).. looking at the details, it looks more interesting. Only
15/16 -> * got slower. 24/32 -> * actually got faster.

Below are the results from the first run, the numbers are: value your
test program printed with the CVS version, with the patched version, and
the % value (the other 2 runs are within maybe +/-5% of this).

In any case, the results someone else posted look good..

dithered, keep trans
24 -> 15 : 12.695312 7.109375 56.0000022055
32 -> 15 : 12.265625 6.718750 54.7770700637
24 -> 16 : 13.085938 6.835938 52.2388077951
32 -> 16 : 12.656250 6.484375 51.2345679012
0.535626119914
dithered, no keep trans
24 -> 15 : 10.429688 6.796875 65.1685362017
32 -> 15 : 10.117188 6.562500 64.8648616592
24 -> 16 : 10.820312 6.640625 61.3718439912
32 -> 16 : 10.468750 6.289062 60.0746220896
0.628699659854
non-dithered, keep trans
15 -> 16 : 7.460938 5.859375 78.5340261506
15 -> 24 : 7.578125 5.898438 77.8350581443
15 -> 32 : 7.539062 4.609375 61.1399004279
16 -> 15 : 7.382812 5.859375 79.3650847401
16 -> 24 : 7.578125 5.898438 77.8350581443
16 -> 32 : 7.578125 4.609375 60.824742268
24 -> 15 : 6.953125 2.617188 37.6404566292
24 -> 16 : 6.992188 2.656250 37.9888240991
24 -> 32 : 7.031250 2.734375 38.8888888889
32 -> 15 : 7.187500 2.460938 34.2391373913
32 -> 16 : 7.070312 2.500000 35.3591185226
32 -> 24 : 7.187500 2.929688 40.7608765217
0.550342643274
non-dithered, no keep trans
15 -> 16 : 2.031250 2.109375 103.846153846
15 -> 24 : 2.851562 4.960938 173.972650779
15 -> 32 : 1.796875 2.070312 115.217363478
16 -> 15 : 2.031250 2.109375 103.846153846
16 -> 24 : 2.851562 4.921875 172.602769991
16 -> 32 : 1.757812 2.109375 120.000034133
24 -> 15 : 3.554688 2.304688 64.8351697814
24 -> 16 : 3.476562 2.226562 64.0449386492
24 -> 32 : 3.242188 3.203125 98.795165487
32 -> 15 : 1.757812 1.718750 97.7778055901
32 -> 16 : 1.757812 1.718750 97.7778055901
32 -> 24 : 2.265625 1.757812 77.5861848276
1.07525183

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/