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

Point and Rect optimizations #71

Open
ghost opened this issue May 9, 2016 · 1 comment
Open

Point and Rect optimizations #71

ghost opened this issue May 9, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented May 9, 2016

I noticed Point and Rect both make use of constexpr, but do not make use of r-value references. This allows for optimizations when the Point and Rect are known at compile time, but leads to suboptimal performance when they are not.

Using non-friend, non-member operators (while tedious) could lead to a substantial performance boost, as could using r-value this member operators (a bit esoteric), or C++14 style constexpr (as C++11 style constexpr cannot use r-values, but C++14 style can), or some mix of these techniques.

I'd be willing to implement any of these solutions, just looking for guidance on which is most acceptable.

@AMDmi3
Copy link
Member

AMDmi3 commented Nov 14, 2016

Could you please alaborate? I cannot see any use for r-value refs with POD types.

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

1 participant