Hm, interesting... It takes 2 milliseconds to allocate the tenvars and 7 to allocate the blitz arrays, but just 2 ms again to deallocate the tenvars, but a whopping 5883 milliseconds to deallocate the blitzarrays.
Why in the world is is so slow to DEALLOCATE memory? I could understand if it took longer to allocate it... Doing so might mean that 0's have to be written to all addresses.
But deallocating it?
And why would an array be slower than a variable? Memory is memory. Technically, with either one, one would assume Blitz calculates the total size of the type, taking into account the size of each field, and then does a single memory alloction or deallocation for all.
So even if Blitz is doing some kind of memory management to defragment memory when freeing the type, because both operations should be IDENTICAL when allocating the memory, they should both taker exactly the same amount of time.
I don't get it. I mean even if Blitz is doing some funny set up internally for the array... still... Why would it affect deallocation? And why would it increase the time so much?
This doesn't make any sense. I'm gonna have to assume Mark messed up on this one. Hopefully he'll explain it to us. Inquiring minds want to know!
Well at least I know now that allocating the types isn't gonna slow stuff down. Just deallocating them.
Why in the world is is so slow to DEALLOCATE memory? I could understand if it took longer to allocate it... Doing so might mean that 0's have to be written to all addresses.
But deallocating it?
And why would an array be slower than a variable? Memory is memory. Technically, with either one, one would assume Blitz calculates the total size of the type, taking into account the size of each field, and then does a single memory alloction or deallocation for all.
So even if Blitz is doing some kind of memory management to defragment memory when freeing the type, because both operations should be IDENTICAL when allocating the memory, they should both taker exactly the same amount of time.
I don't get it. I mean even if Blitz is doing some funny set up internally for the array... still... Why would it affect deallocation? And why would it increase the time so much?
This doesn't make any sense. I'm gonna have to assume Mark messed up on this one. Hopefully he'll explain it to us. Inquiring minds want to know!
Well at least I know now that allocating the types isn't gonna slow stuff down. Just deallocating them.