1. What's faster memory or sequences?
What's faster memory or sequences?
`````````````````````````````````````````````````````````````````````
I am working with virtual screens and sprites, and i want to know
which is faster?
Like this:
Clearing a sequence with repeat (0,length(sequence) )
OR
Clearing memory with mem_set(loc, 0, length)
Poking a whole sequence to the video memory
OR
Memcopying an allocated memory block to the video memory
Subslicing a one-dimensional sequence
OR
Use random acces in a 2D- sequence
OR
Subslicing memory by calculating the section
Thanx
`````````````````````````````````````````````````````````````````````
<<.. Ralf Nieuwenhuijsen ..>>
<<.. nieuwen at xs4all.nl ..>>
2. Re: What's faster memory or sequences?
>
> What's faster memory or sequences?
> `````````````````````````````````````````````````````````````````````
In general, memory is always faster.
> I am working with virtual screens and sprites, and i want to know
> which is faster?
> Like this:
>
> Clearing a sequence with repeat (0,length(sequence) )
> OR
> Clearing memory with mem_set(loc, 0, length)
mem_set
> Poking a whole sequence to the video memory
> OR
> Memcopying an allocated memory block to the video memory
Memcopying
> Subslicing a one-dimensional sequence
> OR
> Use random acces in a 2D- sequence
> OR
> Subslicing memory by calculating the section
>
Dunno on that one..haven't tried all of them, however, slicing memory by
calculation is fast. Would be faster if we had bit shifting (for
calculation of offsets and such)
L8r,
Greg Harris
blackdog at cdc.net