rapidsai / distributed-join

Other
19 stars 12 forks source link

Remove unnecessary calls to std::move #45

Closed esoha-nvidia closed 3 years ago

esoha-nvidia commented 3 years ago

std::move is only needed if the returned value from a function doesn't implement move semantics. But cudf::make_numeric_column returns a std::unique_ptr<> and std::unique_ptr, like everything in the standard library, already has move semantics.

Using std::move where it isn't necessary can prevent compiler optimizations.

esoha-nvidia commented 3 years ago

Explained here: https://mbevin.wordpress.com/2012/11/20/move-semantics/

gaohao95 commented 3 years ago

I think it is okay here because cudf::make_numeric_column is already a rvalue, and the std::move is essentially a no-op.