By 1840, railroad mileage equaled that of canals but the railroad was faster, more flexible, and more reliable, and soon surpassed canals as America's favorite form of transportation, able to move four times as much freight as a canal barge for the same cost.