Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slight optimization for Events, cache splitting Regex #1097

Merged
merged 1 commit into from
Mar 14, 2012
Merged

Slight optimization for Events, cache splitting Regex #1097

merged 1 commit into from
Mar 14, 2012

Conversation

lxb
Copy link
Contributor

@lxb lxb commented Mar 14, 2012

  • cache the regular expression used to separate the event string
  • changed old eventSplitter to delegateEventSplitter to remove ambiguity
  • http://jsperf.com/triggering
  • not caching the regex is 85% slower on chrome linux i686

- cache the regular expression used to separate the event string
- changed old eventSplitter to delegateEventSplitter to remove ambiguity
- http://jsperf.com/triggering
- not caching the regex is 85% slower on chrome linux i686
@jashkenas
Copy link
Owner

Interesting -- caching the same regex used to have no effect in browser engines ... I wonder what changed.

jashkenas added a commit that referenced this pull request Mar 14, 2012
Slight optimization for Events, cache splitting Regex
@jashkenas jashkenas merged commit 44b40c1 into jashkenas:master Mar 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants