Efficient global fanout optimization algorithms