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

Use module_eval to define locale accessors #219

Merged
merged 2 commits into from
May 8, 2018

Conversation

shioyama
Copy link
Owner

@shioyama shioyama commented May 8, 2018

For methods which will be called more often than they will be defined, it's generally better to use module_eval which is faster on dispatch (but slower to define).

@shioyama shioyama force-pushed the locale_accessors_module_eval branch from 6db4967 to 0fe7410 Compare May 8, 2018 00:42
shioyama added 2 commits May 8, 2018 11:12
These are accessors so they may be called often, better to optimize for
dispatch speed (eval) over definition speed (define_method).
@shioyama shioyama force-pushed the locale_accessors_module_eval branch from e55519c to 25440a6 Compare May 8, 2018 02:16
@shioyama shioyama changed the title Use module_eval do define locale accessors Use module_eval to define locale accessors May 8, 2018
@shioyama shioyama merged commit 25440a6 into master May 8, 2018
@shioyama shioyama deleted the locale_accessors_module_eval branch May 8, 2018 05:53
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.

1 participant