J
J Anderson
Greetings,
I was going through the quake2 source code (as you do) when I noticed
arrays are statically allocated on the stack instead of being allocated
dynamically. I’ve seen this before and know it’s for efficiency.
I’m basically questioning the merit of such technique nowadays, for
performance-orientated applications? Is it better to dynamically
allocate a smaller array to fit the memory or to use one huge statically
allocated array? Or even one even larger static array and chop it up at
runtime?
Can you point me to any websites (and yes I have searched) that compare
the differences in performance using both approaches?
Thanks.
I was going through the quake2 source code (as you do) when I noticed
arrays are statically allocated on the stack instead of being allocated
dynamically. I’ve seen this before and know it’s for efficiency.
I’m basically questioning the merit of such technique nowadays, for
performance-orientated applications? Is it better to dynamically
allocate a smaller array to fit the memory or to use one huge statically
allocated array? Or even one even larger static array and chop it up at
runtime?
Can you point me to any websites (and yes I have searched) that compare
the differences in performance using both approaches?
Thanks.