More Speed/Function Benchmarking Fun!
Displaying 1-11 of 11 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Omni

So I was working on a way to optimize a drawing function and I decided to just test some stuff to see what happens. Here are some results, maybe they'll help someone. All graphics functions were done with a 640x480 image.

Some functions have more than one time, because I ran them more than once. Essentially I looped each test 5,000 times in a FOR() loop and checked the time.

5,000 cycle tests.

[Number] [Test] [Time] (in centisecs)
1 No function 1
2 NewImage, Blit, FreeImage 2486, 2473
3 ImageShell, FreeImage 10
4 RectFill 640x480 3
5 Blit (640x480) 2

6 RotScale (640x480, 1000 scale) 4253, 4204
500 scale 4156, 4156
2000 scale 1830
1000 scale, 35 angle 4879
500 scale, 35 angle 4547
2000 scale, 35 angle 2552

7 RotScale (640x1, 1000 scale) 2616
500 scale 2610
2000 scale 895
100 scale (ie, 10x bigger) 2646
1000 scale, 35 angle 2614
500 scale, 35 angle 2632
2000 scale, 35 angle 878

8 RotScale (640x1, 1000 scale), 480 times took too long -- no patience to wait for completion

9 SetLucent-50, AdditiveBlit 640x480, SetLucent-0 12
10 SetLucent-30, AdditiveBlit 640x480, SetLucent-0 27
11 AdditiveBlit 640x480 (lucency at 0) 27
12 AdditiveBlit 640x480 (lucency at 50) 12

12 Variable assignment by function 2
variable = ImageHeight(screen)
13 Variable assignment by variable 0
variable = timer

14 SetLucent (something), SetLucent 0 2


Conclusions/Thoughts
1. NewImage() is very slow compared to ImageShell
2. Scaling an image down with Rotscale decreases the render time.
3. Scaling an image up past the clipping area decreases the render time,
when compared with an image that takes up _all_ the clipping area.
(though the difference seems to be negligible)
4. Rotation seems to increase the render time for a RotScale by approx. 1/8th.
5. RotScale rendering must be based on the destination--
an item scaled insanely huge (10x) takes the same time as a normal RotScale that will fit the image's dimensions.

6. Reducing the actual amount of source data decreases the RotScale render time,
but not by the proportion of source data loss.

(ie, scaling the source data down by 1/2 will not make RotScale run twice as fast).
7. AdditiveBlit seems to run _faster_ when 50% lucency in enabled.
--any other lucency causes the speed to be as if lucency was not enabled.

Posted on 2005-06-17 22:36:39

CrazyAznGamer

Where's Omni's avatar?
I figure the trivial contributions he has made throughout VERGE history has to augment to something.

Posted on 2005-06-17 23:19:34 (last edited on 2005-06-17 23:20:09)

basil

If you're getting much variation in the timing results between runs I'd recommend setting up a running average and just letting it go for a couple of minutes. It helped me immensely when I was doing similar tests.

Posted on 2005-06-18 00:49:43

Gayo

Now run a statistical analysis on those figures to determine whether the differences are significant at a p-value of .05 or lower!

Posted on 2005-06-18 00:50:25 (last edited on 2005-06-18 00:50:44)

basil

Also the version of verge.exe you're using can have dramatic results. The current engine incarnation is over twice as fast with an april 04 exe than a june 05 exe.

Posted on 2005-06-18 01:12:16

Omni

Oh bloody. I forgot all about that. I haven't been downloading these bleeding-edge releases.

(if that's what you mean by the June '05 exe)

EDIT: speaking of which...um...where do you find those, again?

I wonder if there is a way to make AdditiveBlit alone as fast as AdditiveBlit with 50% lucency. It stinks to think that my blit is twice as slow just because I'm not using lucency.

Posted on 2005-06-18 13:37:25 (last edited on 2005-06-18 13:54:27)

Overkill

Quote:Originally posted by Omni

Oh bloody. I forgot all about that. I haven't been downloading these bleeding-edge releases.

(if that's what you mean by the June '05 exe)

EDIT: speaking of which...um...where do you find those, again?

I wonder if there is a way to make AdditiveBlit alone as fast as AdditiveBlit with 50% lucency. It stinks to think that my blit is twice as slow just because I'm not using lucency.


http://vecna.verge-rpg.com/verge.exe is the place to go, then http://vecna.verge-rpg.com/v3vergec.txt and http://vecna.verge-rpg.com/v3changes.txt for more stuff.

Posted on 2005-06-18 15:45:02

basil

I'm saying the _older_ release is faster. Don't know where you'd get an older release short of people's demos.

Posted on 2005-06-18 17:06:19

Overkill

Older releases... faster? :o

I could see starting up the exe taking longer, but not the actual blit processes! Strange.

Posted on 2005-06-18 17:09:03

basil

Quite possibly the blits are the same speed ... I was perhaps misleading when I said the current engine is twice as fast in so far as I meant the 3d engine. The v3 engine I can't comment on other than to say the parts of it I use are faster in earlier incarnations.

Posted on 2005-06-18 18:02:30

ThinIce

My god... what have you done!

Posted on 2005-06-18 18:42:31


Displaying 1-11 of 11 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.