Abstracting methods - best technique?

Abstracting methods - best technique?

Is there any difference between the two following things - assume we have lots of divs -
  1. $('DIV').each(function() {
  2.         /* some long and complex logic here */
  3. });
or

  1. $.fn.myMethod = function() {  /* some long and complex logic here */ }
  2. $('DIV').myMethod();

I'm thinking that maybe the javascript parser has to reparse the long-and-difficult bit each time in the first instance, but not in the second. But maybe they're actually just the same?

Thanks.