Hi everybody,
at the gretl conference the last couple of days we also talked about the
speed improvements, and (as always) an idea was to run some tests or
comparisons. So here's a first piece of evidence concerning the hansl
scripting language, which uses the non-econometric RBC solution code
example that Federico had presented at the Berlin conference in 2015.
The adapted code scripts are attached. (Ignore the reference to the
hanslspeedjulia.gfn package, it's not used in there and it's a
non-published secret package at this point.)
Notes:
- The code is heavily loop-based, and there are basically no calls to
other user-defined functions, and only relatively few calls to native
gretl functions. It's mostly just straightforward arithmetic, but still
long-running. AFAIK the function call overhead has also been much
improved in hansl in recent years, but this will _not_ be showing in
this example.
- I'm running the comparison on an old Windows-10 machine in the GUI
program; the gretl versions are:
(1) 1.9.12 from ten years ago (March 2013, 32bit);
(2) 2018a from almost exactly five years ago (June 2018, 64bit);
(3) the latest snapshot (June 2023, 64bit).
Executive summary:
gretl's performance in this subarea has tripled from 2013 to 2018, and
doubled again from 2018 to today. Overall in the last 10 years the gain
has almost been 6-fold. (The runtime today is about 17% of what it was
in 2013.)
Timings (best of two runs each):
- 742 sec with version 1.9.12
- 243 sec with version 2018a
- 127 sec with latest snapshot (2023b-git)
Finally, however, it is clear that this kind of code still runs
comparatively slow in interpreted languages like hansl. Doing
just-in-time compilation (JIT) on these kinds of loops will still bring
a massive speedup. (I'm seeing an additional factor of 20 or so.) But
that's a totally different story and a different kind of dimension. This
experiment is about documenting gretl's progress over time.
I know this would be a good addition to some wiki page or so, but for
now it's easier for me to just post this here on the list.
thanks
sven
Show replies by thread