For minified code, shorter (less bytes to be transferred) is always better. So, for a minified file the first option would be best:
(function($,w,d,u){})(jQuery,window,document);
46 characters.
Compared to the other option:
(function(){var $=jQuery,w=window,d=document,u=undefined;})();
62 characters.
P.S. You did your closures wrong. (function(){}())
will throw a syntax error. (function(){})()
won't.