Mail Archives: djgpp/1996/07/05/15:14:44
>> Pin F. Sun wrote:
>> I am trying to find out a quick way to clear memory. I used memset or
>> bzero function, but they are way too slow. I am trying to use assembly
>> language...
> memset() uses rep stosd. you don't get much [quicker] than that!
While this is true, it is also true that string instructions are not
recommended for superscalar processors, like the Pentium. I believe
that in the user's manual Intel warns against using them. On the PPC 604,
they are slower than sti's.
All the same, surprisingly enough, ANY method of transfering data --
memcopy, optimized assembler, loops ( rolled! ) -- is just as fast on
the pentium ( try it! ). I believe what is really measured is memory
access speed as the pentium writes back its caches.
Pin F. Sun wrote:
> As I know, data transfering to video ram is about 5-6 times slower than
Hmmmm.... check your intelligence ( i.e., source ).
As for clearing video ram, your local friendly graphics co-processor
might have a function for that :-).
- Raw text -