[comp.sys.amiga.tech] How fast is the BltBitMap

GALETTI@uservx.afwl.af.mil (09/14/90)

How fast is the graphics.lib "BltBitMap()" routine?  It seems to me that
setting up the blitter for a copy shouldn't take all that much time. 

However, if you have two routines that copy the same amount of area from one
bitmap to another, and one of the routines does the copy with one blit while 
the other routine does the copy with two half-sized blits, the two half-sized 
blits take noticeably longer than the single copy.

I am using BltBitMap() to do the copies.  For those of you who have experience
writing your own blitter routines, do you think it would it be worth my while 
to write a replacement for BltBitMap()?  How significant would the speedup be?

Thank you in advance,

-Ralph

djh@neuromancer.metaphor.com (Dallas J. Hodgson) (09/20/90)

In article <11825@uservx.afwl.af.mil> GALETTI@uservx.afwl.af.mil writes:
>How fast is the graphics.lib "BltBitMap()" routine?  It seems to me that
>setting up the blitter for a copy shouldn't take all that much time. 
>
>However, if you have two routines that copy the same amount of area from one
>bitmap to another, and one of the routines does the copy with one blit while 
>the other routine does the copy with two half-sized blits, the two half-sized 
>blits take noticeably longer than the single copy.
>
>I am using BltBitMap() to do the copies.  For those of you who have experience
>writing your own blitter routines, do you think it would it be worth my while 
>to write a replacement for BltBitMap()?  How significant would the speedup be?
>
>Thank you in advance,
>
>-Ralph

What timing, I was just experimenting with this last night. For the
animation I was working on, I tried this two ways: Using BltBitMap, and
using a near-equivalent routine which had CopyMemQuick at its core. The
CopyMemQuick routine was always significantly faster, even with FAST RAM and
caching turned off on my A-3000.

This may not hold true for 16-bit Amigas. I plan to do an A-1000 benchmark
tonight.
+----------------------------------------------------------------------------+
| Dallas J. Hodgson               |     "This here's the wattle,             |
| Metaphor Computer Systems       |      It's the emblem of our land.        |
| Mountain View, Ca.              |      You can put it in a bottle,         |
| USENET : djh@metaphor.com       |      You can hold it in your hand."      |
+============================================================================+
| "The views I express are my own, and not necessarily those of my employer" |
+----------------------------------------------------------------------------+

p554mve@mpirbn.mpifr-bonn.mpg.de (Michael van Elst) (09/26/90)

In article <1437@metaphor.Metaphor.COM> djh@neuromancer.metaphor.com (Dallas J. Hodgson) writes:
>What timing, I was just experimenting with this last night. For the
>animation I was working on, I tried this two ways: Using BltBitMap, and
>using a near-equivalent routine which had CopyMemQuick at its core. The
>CopyMemQuick routine was always significantly faster, even with FAST RAM and
>caching turned off on my A-3000.

Now, who's wondering ? The A3000 has a faster processor which can access
chip ram faster than the blitter.

And yet, this not true for any other Amiga (even with 68020/030). And with
shifts you're loosing even on the A3000.

Regards,
-- 
Michael van Elst
UUCP:     universe!local-cluster!milky-way!sol!earth!uunet!unido!mpirbn!p554mve
Internet: p554mve@mpirbn.mpifr-bonn.mpg.de
                                "A potential Snark may lurk in every tree."

jesup@cbmvax.commodore.com (Randell Jesup) (09/28/90)

In article <1437@metaphor.Metaphor.COM> djh@neuromancer.metaphor.com (Dallas J. Hodgson) writes:
>In article <11825@uservx.afwl.af.mil> GALETTI@uservx.afwl.af.mil writes:
>>How fast is the graphics.lib "BltBitMap()" routine?  It seems to me that
>>setting up the blitter for a copy shouldn't take all that much time. 
...
>>I am using BltBitMap() to do the copies.  For those of you who have experience
>>writing your own blitter routines, do you think it would it be worth my while 
>>to write a replacement for BltBitMap()?  How significant would the speedup be?
...
>What timing, I was just experimenting with this last night. For the
>animation I was working on, I tried this two ways: Using BltBitMap, and
>using a near-equivalent routine which had CopyMemQuick at its core. The
>CopyMemQuick routine was always significantly faster, even with FAST RAM and
>caching turned off on my A-3000.

	You can improve on the speed of BltBitMap for special cases, and
if you can avoid other special cases.  For example, BltBitMap would normally
only need a source and destination for a straight copy, except that for
some types of alignment of source and dest the masks aren't sufficient, and
a second source channel (A) is needed to point to a small mask in memory.
An '030 may be able to keep up with the blitter on nicely aligned copies
(such as scrolls), though of course it can't be doing anything else in the
meantime.

>This may not hold true for 16-bit Amigas. I plan to do an A-1000 benchmark
>tonight.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"