To be honest, if I had to go with one or the other, cost aside, I’d choose the AC because it cools and sucks some of the humidity out of the air (if it’s a half-decent machine). While it does use a lot of electricity, you can at least turn it off when you’re not there.
My family all got sick of the dehumidifier after a while because 1) you need to run it most of the time; 2) it’s good for only one room, and you need to keep that room pretty well sealed off or the humidity creeps back in; 3) following from number 2, it doesn’t do much good to run the humidifier with the windows open, so it’s just too unbearbly hot in the summer to use the dehumidify on its own; and 4) you have to empty the damn thing too often.
I used the dehumidifier more in the winter.
Hope this helps