3 ms·
> Check out the famous NASA coding rules. Rule number one is no recursion. And rule number 3 is no heap allocation.
by mrkeen 2y ago
> Check out the famous NASA coding rules. Rule number one is no recursion.
And rule number 3 is no heap allocation.
- dahart 2y agoYep. I don’t use NASA’s rules though, it was just an example. Like most of graphics research, flood fill is an algorithm you won’t ever see in a safety critical environment like the space shuttle. And for better or worse, heap allocation is used in production code several orders of magnitude more often than recursion. Heap allocation was to be avoided when I was first working in games, but these days people use it all the time.