Skip to content

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