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

Consider making dictionary values static #6

Closed
jdm opened this issue Jan 26, 2017 · 2 comments
Closed

Consider making dictionary values static #6

jdm opened this issue Jan 26, 2017 · 2 comments

Comments

@jdm
Copy link

jdm commented Jan 26, 2017

All the values in src/dictionary/mod.rs are currently marked const, and this looks like it could hurt the code that uses them. Const values are inlined in every use, whereas static values have a single global location in memory.

Reference: https://doc.rust-lang.org/book/const-and-static.html

@danielrh
Copy link
Collaborator

danielrh commented Feb 2, 2017

wow nice find...will update and benchmark

@danielrh
Copy link
Collaborator

yup it helps!

This issue was closed.
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

No branches or pull requests

2 participants