Tradeoff of horizontal decomposition versus vertical stacking in rearrangeable networks