perf: Add more moves and optimize (#3845)

* Make slice constructor consistent

* Add more missing std::move for ref steals

* Add missing perfect forwarding for arg_v ctor

* Add missing move in arg_v constructor

* Revert "Add missing move in arg_v constructor"

This reverts commit 126fc7c524.

* Add another missing move in cast.h

* Optimize object move ctor

* Don't do useless move

* Make move ctor same as nb

* Make obj move ctor same as nb

* Revert changes which break MSVC
This commit is contained in:
Aaron Gokaslan
2022-04-05 14:36:39 -04:00
committed by GitHub
parent f2f0c69096
commit c4e295287b
4 changed files with 10 additions and 13 deletions

View File

@@ -640,9 +640,9 @@ private:
list names, formats, offsets;
for (auto &descr : field_descriptors) {
names.append(descr.name);
formats.append(descr.format);
offsets.append(descr.offset);
names.append(std::move(descr.name));
formats.append(std::move(descr.format));
offsets.append(std::move(descr.offset));
}
return dtype(std::move(names), std::move(formats), std::move(offsets), itemsize);
}