Sorry for double post.
Okay, just got to a compiler, and got some results:
There is not much of a noticeable difference, and using 10,000 iterations is a gross exaggeration of any real world scenario. I doubt that extra 2 ms will make much of a difference.
Here is the source code:
#include "DarkGDK.h"
#include <cstdio>
#define ITERATIONS 10000
void DarkGDK() {
// Some setup stuff
dbSyncOn();
dbSyncRate(60);
dbSetWindowTitle("dbPasteSprite vs. dbPasteImage");
// Create the images/sprites
dbCreateAnimatedSprite(1, "image.png", 1, 1, 1);
dbLoadImage("image.png", 2);
char outputBuff[64] = "";
int timeStart = 0;
int spriteTime = 0;
int imageTime = 0;
while (LoopGDK()) {
dbCLS(); // Clear the screen
// Sprite routine
timeStart = dbTimer();
for (int i = 0; i < ITERATIONS; i++)
dbPasteSprite(1, 0, 0);
spriteTime = dbTimer() - timeStart;
// Image routine
timeStart = dbTimer();
for (int i = 0; i < ITERATIONS; i++)
dbPasteImage(2, 0, 0);
imageTime = dbTimer() - timeStart;
sprintf(outputBuff, "# of iterations: %i\nSprite time: %i ms\nImage time: %i ms", ITERATIONS, spriteTime, imageTime); // Format an output string
dbCLS(); // Clear the screen
dbPrint(outputBuff); // Output the results
dbSync(); // Sync up stuff
}
// Clean-up
dbDeleteSprite(1);
dbDeleteImage(1);
dbDeleteImage(2);
return;
}
And "image.png," which was used for pasting:
http://ref.darkgdk.us/ <- Online DarkGDK Refernece. More content coming soon.