Re: The effect of ref

2019-11-21 Thread ketmar via Digitalmars-d-learn
Adam D. Ruppe wrote: On Friday, 22 November 2019 at 03:42:26 UTC, dokutoku wrote: Is there a difference in the execution speed and stability when executing the program by rewriting the parameter of the function argument like this? the generated code the processor sees is generally identical,

Re: The effect of ref

2019-11-21 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 22 November 2019 at 03:42:26 UTC, dokutoku wrote: Is there a difference in the execution speed and stability when executing the program by rewriting the parameter of the function argument like this? the generated code the processor sees is generally identical, but the `ref` version

Re: The effect of ref

2019-11-21 Thread mipri via Digitalmars-d-learn
On Friday, 22 November 2019 at 03:42:26 UTC, dokutoku wrote: Is there a difference in the execution speed and stability when executing the program by rewriting the parameter of the function argument like this? ```d void test1 (int * X) { // some processing } void test2 (ref int X) {

The effect of ref

2019-11-21 Thread dokutoku via Digitalmars-d-learn
Is there a difference in the execution speed and stability when executing the program by rewriting the parameter of the function argument like this? ```d void test1 (int * X) { // some processing } void test2 (ref int X) { // some processing } ```