Trees and streams: the efficiency of branching patterns.