Feeds

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

Let's just call it a runtime error

New hybrid storage solutions

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.

Secure remote control for conventional and virtual desktops

More from The Register

next story
Not appy with your Chromebook? Well now it can run Android apps
Google offers beta of tricky OS-inside-OS tech
Keep that consumer browser tat away from our software says Oracle
Big Red decides it will only support Firefox's Extended Support Releases
Greater dev access to iOS 8 will put us AT RISK from HACKERS
Knocking holes in Apple's walled garden could backfire, says securo-chap
WordPress 4.0 is here, complete with one-click upgrade process
Don't relax yet, sysadmins, there's still a chance for some big messes here
NHS grows a NoSQL backbone and rips out its Oracle Spine
Open source? In the government? Ha ha! What, wait ...?
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Intel: Hey, enterprises, drop everything and DO HADOOP
Big Data analytics projected to run on more servers than any other app
prev story

Whitepapers

Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.