This site is no longer active and is available for archival purposes only. Registration and login is disabled.

ASM & two pixels at a time


ASM & two pixels at a time

Postby fast_rx » Mar 8, 2004 @ 4:44am

I'm still messing around with optomizing some code using assembly...

And I've seen how you can blit 2 pixels at a time to increase the speed, but what if the situation is where you can't grab a pair of pixels at once?

If I did it two at a time, I would have something like this

calc first pixel
grab 1 pixel
calc second pixel
grab 1 pixel
shift and or pixels together
put 2 pixels to screen

Ok, so as you can see, I would sill have the same number of grabs, one less put, but I'd have to shift and or the pixels together.

Would the overhead of a write to memory worth the effort with the other things considered? I guess it could depend on the caching as well, which I don't understand fully.

I guess I could try it and bench mark it, but currently, I'm using all the registers, so it's not as simple as adding a couple of lines.

Thanks for anyone's opinions...
User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby warmi » Mar 8, 2004 @ 7:43am

warmi
pm Insider
 
Posts: 518
Joined: Aug 24, 2002 @ 8:07am
Location: Chicago USA


Postby Pejo Software - Per » Mar 8, 2004 @ 8:30am

User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby refractor » Mar 8, 2004 @ 9:26am

User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum