junrushao commented on code in PR #78:
URL: https://github.com/apache/tvm-ffi/pull/78#discussion_r2404677029


##########
include/tvm/ffi/function.h:
##########
@@ -711,11 +713,11 @@ class TypedFunction<R(Args...)> {
    * \param args The arguments
    * \returns The return value.
    */
-  TVM_FFI_INLINE R operator()(Args... args) const {
+  TVM_FFI_INLINE R operator()(const Args&... args) const {

Review Comment:
   it does suggest us to use const reference, but i suppose with `std::move` 
there won't be significant overhead.
   
   ```
   /Users/jshao/Projects/tvm-ffi/include/tvm/ffi/function.h:716:39: error: the 
parameter 'args' is copied for each invocation but only used as a const 
reference; consider making it a const reference 
[performance-unnecessary-value-param,-warnings-as-errors]
     716 |   TVM_FFI_INLINE R operator()(Args... args) const {
         |                                       ^
         |                               const  &
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to