Advertisement

newbie question

Started by May 09, 2000 08:48 AM
1 comment, last by OoMMMoO 24 years, 7 months ago
I have two questions 1. Is making a for loop as fast as using memset for putting memory into certain addresses? 2. Where can I start to learn to program games fro windows, if I have no experience with direct x or direct draw?
quote: Original post by OoMMMoO
1. Is making a for loop as fast as using memset for putting memory into certain addresses?


Depends how you write it. It could be faster, slower, or the same. Memset is using a loop internally.

quote:
2. Where can I start to learn to program games fro windows, if I have no experience with direct x or direct draw?


There''s lots of tutorials on the net, lots of samples with the SDK, and some good books around (Tricks of the Windows Game Programming Gurus is a fairly decent one).

aig
aig
Advertisement
memset is often written in very optimized assembly and is very fast (faster than a for loop you could write)

but if you are only filling a few bytes, the overhead of using memset might not be worth it

for any sizeable memory blocks, use the memory functions... memset or memcpy..


adamm@san.rr.com
adamm@san.rr.com

This topic is closed to new replies.

Advertisement