The current polynomial algorithm can be improved.
Each layout calculates its own set of coefficients, but it is possible to merge the calculation into a single algorithm. To do this, we need to create a set of intermediate properties. For example, left is context dependent in the Titanium API, but if we split left into _left and _paddingLeft (determined by the layout), then _left is no longer context dependent and the coefficients can be calculated by a single algorithm, thus saving a ton of code space.
The layout algorithm sometimes needs to defer the calculation of a nodes position until more information is obtained from other nodes. We should categorized these types of defers into "pass queues". Instead of determining this information dynamically at layout time, this can be determined statically at coefficient calculation time. By removing all of the conditionals in the layout algorithm, performance will be increased.