You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: