On Nov 23, 2009, at 10:17, Ian Bolton wrote: > Regardless of the architecture, I can't see how an unbalanced tree would > ever be a good thing. With a balanced tree, you can still choose to > process it in either direction (broad versus deep) - whichever is better > for your architecture - but, as far as I can see (bearing in mind that > I'm very new to GCC development!), a tall lop-sided tree gives few > scheduling options due to all the extra dependencies. I guess I must > be missing something?
Yes, a lop-sided tree often needs less registers. For example, (((a+b)+c)+d)+e would only need 2 registers. Any more balanced tree would need at least one more. -Geert