This doesnt seem right, re: memory banks
Blitz3D Forums/Blitz3D Programming/This doesnt seem right, re: memory banks
| ||
This cant be right? |
| ||
T() |
| ||
That's strange. I thought dim-arrays and banks are internally the same. My results are time=308ms, timeb=187ms. But doing 32.767.000 pokes in a row isn't usual business, is it? Seeing the advantages of banks (resize w/o data loss, usability in types), they're still the winner... |
| ||
For starters, asking a 32 or 64 bit processor to perform many 8-bit operations is never going to be the fastest thing in the world. Secondly, you are then comparing a byte operation against a word (32 bit) operation. b() is an array of 32 bit values, not 8 bit (as in the case of PokeByte-ing). Also, why are you defining the loop variable i as a float? You should define a counting loop variable as an int (e.g. i%). |
| ||
PokeByte is a function call and so incurs an overhead, speed-wise. Array manipulation compiles to direct memory access commands and so doesn't have the overhead. |