Some micro-optimization thing...

Started by
10 comments, last by RuneLancer 20 years, 5 months ago
quote:Original post by RuneLancer
Edit: I''m at college right now. Forget it all. We''ve just received new PCs today and it runs at almost 200 FPS here. So much for need for optimization.

heh heh, don''t you just love it when that happens?!?!
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Advertisement
for a better compilier, you might want to try PowerBasic -- It's not free, but it generates good code, and when it comes down to it, you can write your own inline asm for the loops if you need.

I would suggest, if I were you, to make a large "bitmap" and then use your own asm functions to blt your images to that, before doing the final bitBlt windows function. I don't know how fast that function would be if you wrote it in VB, seeing as there are no bit shifts, but it still *might* save you tons of time (and score hardcore points with your professor )

Clearly, your blt is the bottleneck, so I would optimize that...

P.S. MUL is not 50 cycles and LSL (which doesn't exist) is also not 5 cycles. mul is about 5-11 (depending on your processor) and shl (shift left register by immediate) is 1 cycle.

For a quick asm reference, you may want to check this gamedev article:
http://www.gamedev.net/reference/articles/article208.asp
http://www.gamedev.net/reference/list.asp?categoryid=20#5

EDIT: lol, cancel that

[edited by - sophisticatedlimabean on November 13, 2003 4:06:45 PM]

This topic is closed to new replies.

Advertisement