Ticket #1324 (closed enhancement: wontfix)
save some byte in filter
|Reported by:||rformato||Owned by:|
Hi, I continue my search to save bytes in jQuery.
My current target is the filter function which refers multiple times to jQuery.expr[ m ]
I stored this value in a var saving 17 bytes.
In the code there is also a resort call that moves the elements inside m to different indexes. However, it seems that the m element remains at index 1.
This, even if dangerous in the long run (more resort functions can appear in the future moving the m element), could bring us even more compression (saving 30 bytes).
This last optimization consists in deleting the second f assignment
f = jQuery.expr[ m ]; if ( f._resort ) m = f._resort( m ); f = jQuery.expr[ m ];
The "secure" patch is attached.