I just moved into a house that has 8 smoke detectors and a few of the are signaling for battery replacements. My local discount mega-store sells 2-pack Duracells for $6.50, Energizers $5.50 and 3-pack's of RayOvac's for
$5.50. Are the RayO's a better value or is it a simple case of "you get what you pay for"? My intuition tells me to go with the Energizers.
We recommend alkaline batteries for the obvious reason of self-discharge in NiCd and NiMh. As was.lost pointed out, change the batteries twice a year. You should also test them weekly and replace the smoke alarms every 5 years.
The battery life also depends upon how frequently the alarm sounds. There is a low drain on the batteries when the unit is monitoring for smoke. When it sounds, there is a larger drain due to the alarm sounding. If you frequently have "supper is ready" false alarms, your battery drain is going to be higher. You want the unit to be able to sound long enough to wake everyone in the house up in case of fire.
Generally most batteries are still good when replaced at the 6-month time frame. However, for the cost, it's better to be safe than sorry.