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

Add new_const() for const construction and revert new to old version #183

Merged
merged 1 commit into from Mar 29, 2021

Conversation

bluss
Copy link
Owner

@bluss bluss commented Mar 29, 2021

The new() function is significantly faster, it optimizes better at the
moment/in current rust. For this reason, provide a const fn constructor,
but not as the default new.

It's not expected that the Rust optimization problem can be fixed in the short
term, so we just revert the change to fn new. The performance issue in fn new_const
is not a problem when it's actually used for initializing statics which is the
most important use case.

Fixes #182

…sion

The new() function is significantly faster, it optimizes better at the
moment/in current rust. For this reason, provide a const fn constructor,
but not as the default `new`.
@bluss bluss merged commit b0dfc87 into master Mar 29, 2021
@bluss bluss deleted the revert-new branch March 29, 2021 19:57
@bluss bluss added this to the 0.7.0 milestone Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance regression in 0.6.1
1 participant