Hello,
I have problem, i have make a memory access speed test and i see this:
Memory acess with Peek an Poke command are slower than table command.
The speedest technique to write information is Table[number]=data
What is the utility of memory block function? because table technique is more fast and read global variable too
Some command are useless like Div(), Mul() etc...
X=Mul(2,10) is slower than X=2*10
So why do you keep these command? if you erase these command, we win in size of compiled prg and in readability, because 2 command to make the same things... keep as much faster for programm faster
Table VS Memory Access
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Table VS Memory Access
Memory block functions do not consume as much memory as tables because the memory block is stored as one contiguous chunk. Tables on the other hand are scattered all over the place.ArtBlink wrote:Hello,
What is the utility of memory block function? because table technique is more fast and read global variable too
Also, memory block functions can come in handy when dealing with raw data in memory. Often needed for debugging stuff.
These are kept for compatibility reasons. Removing them wouldn't make the program any smaller because these functions really only have a few lines of codeSome command are useless like DIV(), Mul() etc...
X=Mul(2,10) is slower than X=2*10
So why do you keep these command? if you erase these command, we win in size of compiled prg and in readability, because 2 command to make the same things... keep as much faster for programm faster
Re: Table VS Memory Access
Ok
But i don't understand why access table like command table[index]=[data] is much faster than Peek/Poke/call !!!!
We indicated the size of memory, but we can indicate the type of memory like GFX memory or Fast memory?
But i don't understand why access table like command table[index]=[data] is much faster than Peek/Poke/call !!!!
We indicated the size of memory, but we can indicate the type of memory like GFX memory or Fast memory?
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact: