Most 7805 datasheets specify an input capacitor of 0.33uF or so. This one (the LM340 <http://www.ti.com/lit/ds/symlink/lm340-n.pdf>) at least specifies that the cap is only required if the regulator is "far" from the power supply filter, without further qualifying what "far" means. 0.33uF is nowhere near low impedance at power line ripple frequencies so we can rule that out.

[![enter image description here](https://i.stack.imgur.com/VHGQW.png)](https://i.stack.imgur.com/VHGQW.png)

[![enter image description here](https://i.stack.imgur.com/D6NR9.png)](https://i.stack.imgur.com/D6NR9.png)

Edit: the differences are self evident in the title of the question.