In C++ , there are several ways to write a function:
int foo1(int x){return x;} // copy,which is slow
int foo2(const int &x) {return x;} //quote,which is faster
int foo3(int *x){return *x;} // pointer in C
In Mathematica , when I use
x//foo1//foo2
Which way does mma use? Or mma use some other ways?
Expressionobject, but when you modify one, Mathematica will copy it for you. – b3m2a1 May 11 '20 at 05:58