It seems to me there are two significant time drains: the GUI display
and the atomic reference counts (per your data). And then perhaps there
is a bit for something else--perhaps the workspace variable update...but
I don't see anything happening in the workspace during the following
computation:
GUI:
t0=cputime(); x=1; for i=1:1000000; x = sqrt(x+1); end; t1=cputime();
t1-t0
ans = 9.5256
t0=cputime(); x=1; for i=1:1000000; x = sqrt(x+1); end; t1=cputime();
t1-t0
ans = 9.4986
CLI:
octave:1> t0=cputime(); x=1; for i=1:1000000; x = sqrt(x+1); end;
t1=cputime(); t1-t0
ans = 8.1318
octave:2> t0=cputime(); x=1; for i=1:1000000; x = sqrt(x+1); end;
t1=cputime(); t1-t0
ans = 8.7867