On Sat, 22 Jan 2011, Riccardo (Jack) Lucchetti wrote:
On Sat, 22 Jan 2011, Sven Schreiber wrote:
> The funny thing is that the first version of the code that copies the
> generated number to the variable 'temp' is about 50% slower than the
> version without such copying!
Confirmed here. I'll look into this.
From some preliminary analysis, the difference seems to come from the
fact
that assigning the result to a variable avoids calling
is_gretl_function_call() at line 2369 of lib/src/interact.c; this, in
turn, saves calls to sscanf(), which is quite expensive. Mumble mumble.
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti