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 better Variant implementation #4

Open
arBmind opened this issue May 26, 2019 · 0 comments
Open

Use better Variant implementation #4

arBmind opened this issue May 26, 2019 · 0 comments

Comments

@arBmind
Copy link
Member

arBmind commented May 26, 2019

The std::variant is prone to generate very bad code. Every interaction with the value can throw an exception if the variant is in an invalid state. This exception path basically kills the optimizer.

There are alternative variant implementations like basicpp17/variant17 that are much better at the cost of an required dependency.

Before using this implementation it this should be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant