Pages

Friday, August 6, 2021

Why Dredd Blog Uses C++

Bjarne Stroustrup
1) A Dredd Blog reader is working on software infrastructure which is, among other things, the international standard for Oceanography (Wikipedia). 

2) The C++ version of the software library is available for download at no cost at here.

Here are other reasons: 

"1. Introduction

Computation has become a central tool in economics. From the solution of dynamic equilibrium models in macroeconomics or industrial organization, to the characterization of equilibria in game theory, or in estimation by simulation, economists spend a considerable amount of their time coding and running fairly sophisticated software.

And while some effort has been focused on the comparison of different algorithms for the solution of common problems in economics (see, for instance, Aruoba, Fernandez-Villaverde, and Rubio-RamÃŒrez, 2006), there has been little formal comparison of programming languages.

This is surprising because there is an ever-growing variety of programming languages and economists are often puzzled about which language is best suited to their needs.

Instead of a suite of benchmarks, researchers must rely on personal experimentations or on folk wisdom.

For example, it is still commonly believed that Fortran is the fastest available language or that C++ is too hard to learn.
...
In section 4, we report speed results for each language (including several implementations of the same language and different compilers), but here is a brief summary of some of our main Findings: 

'1. C++ and Fortran are still considerably faster than any other alternative, although one needs to be careful with the choice of compiler.

2. C++ compilers have advanced enough that, contrary to the situation in the 1990s and some folk wisdom, C++ code runs slightly faster (5-7 percent) than Fortran code.'"  

(A Comparison of Programming Languages in Economics, PDF; cf. A Comparison of Programming Languages, not PDF).

Posts here on Dredd Blog have shown that using the international standard is not just for scientific organizations (Build Your Own Thermosteric Computational System, 2; The World According To Measurements, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26).

Just because C++ is the fastest, doesn't mean it is the most difficult to use (see video below if you are a beginner).



No comments:

Post a Comment