A dehumidifier is basically a freezer with no doors on it. The cooling coil condenses humidity for a period of time then shuts off and the ice collected melts into a catch bin. Unless you have a tightly sealed room, they can run forever and barely put a dent in the humidity. Air conditioners are more efficient by making the rooms cooler and lowering the amount of moisture the air can hold.