Programming languages in economics: Cool research, bro, but what about, er, economics?

Let's just call it a runtime error

Boost IT visibility and business value

Worstall on Wednesday Ignoring the central insight and purpose of economics seems odd in an economics paper.

You peeps here at El Reg are most unlikely to be regular readers of papers published by US body NBER, the National Bureau for Economic Research. So I've brought you one we can all puzzle over together (PDF here), "A Comparison of Programming Languages in Economics".

The intention of the researchers was to try to work out which was the best programming language to use in trying to run one of the standard econometric models (those crazed models of how macroeconomists think the real world works).

They code the same model, the same algorithms (without changing them at all even for the known differences with which different languages can handle them) and then time the runs in C++, Python, Fortran, Mathematica, MatLab and so on. They find very different run times, some languages taking hundreds of times longer than others. For those interested in the details, please do read the full paper: I don't understand the details just as I don't the econometric model they're running.

However, I am very interested in an observation made by a mate of mine, Tim Almond (coder for hire if anyone is looking). Despite this being an economics paper, about an economic model, they appear to avoid addressing the "economics" part of what they're looking at. The researchers are solely looking at the runtime of the model, nothing else.

That should get a good laugh from you lot just as it does from me, even though it's for very different reasons. The programmers among you will know instinctively that you don't choose a language just for its runtime. What you'd want to know is what the total time from blank piece of paper to the answer would be.

Some languages (for reasons other than just familiarity) are going to be much easier for tasks like setting up the model run than others will be. Mathematica, or MatLab, just as examples, might be a great deal faster for set-up than if you were to have to rummage around in Fortran or C++. Certainly this writer assumes that they are because that's how they're designed. Higher level languages are easier to set up at the price of slower runtimes.

Looking at this from an economist's point of view, it is akin to insisting we should be economising on the scarce resource (that is what economics is about, after all – the allocation of scarce resources). Perhaps it's true that processor time is the "scarce resource" and thus runtimes are the important limiting factor. But I have to admit that I rather doubt it in the case of a simple macroeconomic model (now, the one the Treasury runs, maybe, but not a simple test model). What is rather more likely is that the "scarce resource" is an economist capable of decent coding in a lower-level language. Or even the time required to do the coding. After all, the runtime can be overnight if needed.

As the paper's authors say:

Our focus on speed should not be taken as the only important metric for language comparison. Other issues (ease of programming, existence of auxiliary tools, vibrant com- munities of fellow programmers) should be considered as well.

Err, yes, yes, that's where all the economics of it is.

5 things you didn’t know about cloud backup

More from The Register

next story
Why has the web gone to hell? Market chaos and HUMAN NATURE
Tim Berners-Lee isn't happy, but we should be
Microsoft boots 1,500 dodgy apps from the Windows Store
DEVELOPERS! DEVELOPERS! DEVELOPERS! Naughty, misleading developers!
'Stop dissing Google or quit': OK, I quit, says Code Club co-founder
And now a message from our sponsors: 'STFU or else'
Apple promises to lift Curse of the Drained iPhone 5 Battery
Have you tried turning it off and...? Never mind, here's a replacement
Linux turns 23 and Linus Torvalds celebrates as only he can
No, not with swearing, but by controlling the release cycle
Scratched PC-dispatch patch patched, hatched in batch rematch
Windows security update fixed after triggering blue screens (and screams) of death
This is how I set about making a fortune with my own startup
Would you leave your well-paid job to chase your dream?
prev story


Best practices for enterprise data
Discussing how technology providers have innovated in order to solve new challenges, creating a new framework for enterprise data.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Advanced data protection for your virtualized environments
Find a natural fit for optimizing protection for the often resource-constrained data protection process found in virtual environments.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?