I was watching David Keller give a talk on Military Prisons for the Civil War Congress the other night, and he was saying that the US Civil War war really the first War where large scale numbers of prisoners were kept. Exchanges were typically done early on in the form of "Parole" - you signed a paper saying that you would return to your own side of the Mason Dixon line, but you would not actively fight until you were formally exchanged - that is, a man from their side had been sent back as well, and so now it was okay for you to go back and join the fray. There was an entire system as to how it was done, called the Dixon Hill Cartel, which said that you could exchange men of equal rank on a one for one basis; or you could exchange, say, ten privates for one sergeant.
Part of the reasoning behind this was that neither side was set up to hold vast numbers of prisoners indefinitely. There were no large scale prison camps, and if you kept the prisoners long term, then you were responsible for feeding them, plus the cost and man power of providing guards, cooks, medical care, etc. - taking away resources that could have been spent on the war effort.
In July, 1863, the system of exchanges broke down, nominally over the South's refusal to exchange a black prisoner for a white southern soldier, but in reality, because the North realized that to keep exchanging prisoners would be to replenish the Confederate Army over and over, whereas the Northern men tended to want to go home once their enlistments were up (early on in the War, a Northern enlistment could be for as little as 3 months). This is also about the time that both sides instituted conscription acts, creating a military draft for the first time ever, and arguably lowering the quality of the soldiers, since a lot of the guys drafted did not particularly care about "the cause" nor did they want to be away from home, potentially for years, in dreadful conditions with spotty pay. Because of the end of prisoner exchanges you end up with places like Andersonville and Elmira where you get tens of thousands of prisoners held in gargantuan prison camps. The cessation of exchanges likely did shorten the war, but the prisoners who were held for years, in some cases, were the ones who paid for it.