-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for static_init
#1
Comments
Unfortunately, my first tests with My results are as follows: With
With
It seems that With
So, for true lazy statics, The bottom line is that apparently, |
As @cofinite mentioned in cofinite/enum_properties#6 (comment),
static_init
might be an interesting alternative tolazy_static
for lazy properties. However, sincestatic_init
uses some OS features (it does not work on bare-metal nor WebAssembly),lazy_static
should remain an option.The hope is that
static_init
could give essentially the same performance as const initialized properties while still allowing lazily initialized values.The text was updated successfully, but these errors were encountered: