larroy commented on a change in pull request #14665: [performance] Avoid
uneccesary vector copies in imperative_utils.cc
URL: https://github.com/apache/incubator-mxnet/pull/14665#discussion_r274163461
##########
File path: src/imperative/imperative_utils.cc
##########
@@ -20,62 +20,61 @@
#include "./imperative_utils.h"
#include "./cached_op.h"
-namespace mxnet {
-namespace imperative {
+namespace {
-inline std::vector<NDArray*> NodeInputs(const nnvm::IndexedGraph& idx,
Review comment:
What's the point of inline here? These are private functions so they are
moved to anonymous namespace. Let the compiler do the inline as the compiler is
better at this than us. We are abusing inline in the codebase.
https://stackoverflow.com/questions/1932311/when-to-use-inline-function-and-when-not-to-use-it
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services