I guess I'm thinking tactics because i have this image i have of machine guns being relatively fixed positions in ww1.
It's really a no contest. Yes, canister shot could be extremely devastating when fired into massed ranks of advancing troops but cannons are heavy, require a number of different components in order to fire and take time to reload, not to mention after inline ring they are pretty much fixed.
The machine gun on the other hand, I assume you are referring to weapons such as the German MG 08 and the British Vickers, were far more versatile weapons. Not only did they have a far superior range then Napoleonic era canister shot, but they were relatively portable (though a crew of six were needed to transport the beast), had a superior rate of sore and when pointed could be fired in an arc, allowing the gunner to cover a much larger area with fire then is possible with a canister round.
Machine gun barrages became common tactics during the First World War, being used to suppress enemy infantry in their trenches while friendly troops advanced. The use of tracer rounds also allowed relatively accurate aiming during the darker hours, an ability all but impossible with canister shot or traditional round shot.