Garwick’s Algorithm is an algorithm for dealing with stack overflows.
Does anybody have ideas on how to modify Garwick’s algorithm for dealing with stack overflows?
The question is about coming up with an algorithm to speed up Garwick’s algorithm. In this case it would mean an algorithm that results with a smaller number of reallocations and a smaller number of cells moved?
Standish (Data Structures, Algorithms, and Software Principles book) offers a table that gives the average number of reallocations and cells moved when dealing with 10 stacks and 1000 elements – elements are added by uniform distribution and a skewed distribution going with (1/2)^(-n), n = 1…10.
One suggested solution is to have even stacks grow in the left direction, and odd stacks in the right direction – I think this gave better results.
Has anybody come accross algorithms that are faster than Garwick’s algorithm ?
Even stacks growing in the left direction, and odd stacks in the right direction gives better results overall.