hasClass Performance Enhancement

hasClass Performance Enhancement

<div>With the addition of hasClass() in 1.2 I noticed that this is simply an alias for .is(). In the project I'm working on there's a need to rely heavily on .is('.class'). I've seen a noticeable improvement in speed by changing .is('.class') to .hasClass('class') and duplicating the behavior of classFilter. Thoughts on this change?</div>
<div> </div>
<div>$.fn.hasClass = function(selector) {
 return this.is( "." + selector );</div>
<div>};</div>
<div> </div>
<div>$.fn.hasClass = function(selector) {
 return !( (' ' + $(this)[0].className + ' ').indexOf(' ' + selector + ' ') == -1 );
};</div>
<div> </div>
<div>Cheers,</div>
<div>-Jonathan</div>