Battery life: 2xAA or 4xAAA - which is better?
Synopsis: 4xAAA + a synchronous buck converter for maximum lifetime.

This is a good question as it shows up the advantages and disadvantages of a couple of approaches to power management. The chart below shows a typical set of discharge curves for an alkaline cell.



The brown curve is at 34mA discharge current, which is greater than the 10mA in your scenario, but still broadly applicable. The first thing to note is that the battery only provides 1.5V right at the start of its life - it rapidly falls off. Since you claim to want 3V, this means that (a) there is no overhead for a linear or buck regulator here and (b) your circuit will not last long at all powered by these! If it turns out that you can tolerate voltages lower than 3V you will get a longer run time, but you certainly won't be using either of the regulators you mention. You could use a boost regulator and get more energy out of the cells by discharging them more deeply, but that isn't what you asked about so I am going to steer clear of it for now and come back to it later.

As for 4xAAA - their nominal output voltage would be 6V, so we do have headroom for a converter. A low quiescent current LDO regulator would be the linear choice here. For a 30mA output current (enough for you), 100mV of dropout voltage is not uncommon, so we shall assume that we can operate all the way from 6V down to 3.1V - that is down to 0.78V per cell - so low that it is off the chart below! Efficiency will range from 50% initially up to 96% just before the LDO finally drops out. Input current draw will remain 10mA throughout.

The chart below shows service life for a typical AAA cell (source) at different depths of discharge.



Now again, we're working off the graph which isn't great, but we can say for sure that the service life at 10mA discharge current for an acceptable cell voltage of 0.8V is greater than 100 hours. So the question is: would this be greater with a buck converter? In theory, yes, but what about in practice - do quiescent currents and switching losses swamp any theoretical gain?

This chart (taken from here) shows that >90% efficiency is possible for 6V in, 3V out at 10mA current draw.



Since the dropout voltage of a buck converter is effectively 0 (switching on the pass transistor just acts as a passthrough) we'll be going all the way down to 3V too, which will put us (slightly) deeper into the discharge curve.

So who's the winner? If you really need the full 3V, you'll get most out of an efficiently designed synchronous buck converter powered by 4xAAA cells, followed by the linear.

If you can deal with voltages lower than 3V, the 2xAA cells approach might work for longer than my initial (dismissive) analysis showed - but given the total energy in 4xAAA is about the same as 2xAA and the series + buck combination will allow for deeper discharge, you're always going to be best with the 4xAAA + buck.