Sending money from your bank to your bank account in Madagascar will get the rate quoted by the Central Bank of that day. Then the money is transferred from the Central Bank to the your bank which may be a small village, so you will get the best rate of that day even if your bank is located in a small village. Were you to change dollars or Euros at banks in smaller villages you would receive much less than changing at a Bank in Tana or the Ivato airport. Tana bank could be for example 2,400ar, in a smaller town it could be 2,100ar, while Central Bank quotes 2,450ar.
So if you plan to revisit Madagascar several times then it might be worth while opening a bank account.
On a similar note, if you are traveling by Air Madagascar more than once to Madagascar then it would be worth joining their Flyer Program called Namako. It is free. And though you may not get enough for free flights you will easily get enough points to carry an additional 10 kilos of bags, in or out of the country saving yourself about $200 dollars, which would be only 30 Namako points and easy to gain on a long haul flight. I recently gain enough Namako points to get a free long Haul flight, roundtrip flight from and to Bangkok.