Hi

I've been seeing the multiple commits for http://dev.jquery.com/ticket/4111.
Moving regexps to local vars to cache them.

I was wondering if this is a perfomance measure and if so, if there's
some benchmark out there to prove the gain.
I personally think these changes make the code more complicated and
longer. I'd rather see the regexp in place if I want to understand
what it does.

I went ahead and created a benchmark for this:
  http://benchmarker.flesler.com/regexp/run/

The conclusions were that there's absolutely no gain in speed except
on IE. Even on IE, it doesn't seem to be such a critic improvement and
it's slower the more you get away from the variables' scope chain (in
nested functions).

Any opinion ?

Cheers
--
Ariel Flesler
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to