What is the best compiler now for intensive calculations?

  • Thread starter exmarine
  • Start date
  • #1
exmarine
241
10
TL;DR Summary
What is the best compiler now for intensive calculations?
What is the best compiler these days – for intensive calculations? My cherished Borland PASCAL Delphi compiler has been “obsoleted” for a very long time now by MS changing their application calls, etc.

And please don’t say FORTRAN, unless it has been totally overhauled. I outgrew it around 1980 when PC’s became available instead of punch cards and mainframes.

Or BASIC, I outgrew it around 1990 when I realized they were NEVER going to allow me to use huge matrices.

Or “C”, I never warmed up to that “Cryptic” language. I was an engineer who used the computer to program my calculations, not a programmer that sometimes wrote for engineers. It should be the compiler’s task to convert readable coding into computer commands and not my task to create unreadable coding for the compiler to then process.

Thanks.
 

Answers and Replies

  • #2
.Scott
Science Advisor
Homework Helper
3,171
1,352
Well, if you don't like "c", you will hate the answer.
These days, compiler optimization is really good. But it is still the case that carefully crafted assembly code that takes specific advantage of the feature available with the specific processor you are using is the "best" when only only the calculating speed counts. Those highly optimized sections are then enclosed in compiler code (most often c or c++).

Next up would be pure c or c++, but you would rather suffer degraded performance than use those compilers.

So, for you "best" is a compromise. Perhaps Matlab, perhaps Python. Maybe even Excel.
Tell me about the kind of "intensive calculations" you require? Is it pretty much the same thing over and over again? Is it a variety? Often requiring the processing of large arrays? How large? Lot's of trig? Do you need nice reports or will text do? Or some of each?

Also, what is your favorite operating system?
 
  • #3
anorlunda
Staff Emeritus
Insights Author
11,207
8,624
I think you should re-examine your need for "intensive calculations". Computers today are so very much faster than when you started. I'll wager that almost any language, any compiler is likely to produce code that you will consider "fast enough".

That is unless you are working on one of those problems where no amount of speed is ever enough. Weather forecasting. Factoring large numbers. But if that is the case, finding one compiler 2x times faster than others, is a trivial difference. You'll need 100x or 1000x or more to make a significant difference.
 
  • Like
Likes QuantumQuest and phinds
  • #4
14,297
8,343
I’ve heard that Julia is making waves in the numerical computing world. It’s syntax is similar to Matlab and it’s speed is comparable to C though not as fast. It has many vectorized operations.

Www.julialang.org

its an MIT baby and is still in the v1.x stage of its life.
 
  • Like
Likes QuantumQuest
  • #5
36,899
8,956
And please don’t say FORTRAN, unless it has been totally overhauled.
Perhaps you havent' been paying attention. From this wikipedia article, https://en.wikipedia.org/wiki/Fortran
It is the primary language for some of the most intensive super-computing tasks, such as in astronomy, climate modeling, computational chemistry, computational economics, computational fluid dynamics, computational physics, data analysis, hydrological modeling, numerical linear algebra and numerical libraries (LAPACK, IMSL and NAG), optimization, satellite simulation, structural engineering, and weather prediction.[citation needed] Many of the floating-point benchmarks to gauge the performance of new computer processors, such as the floating-point components of the SPEC benchmarks (e.g., CFP2006, CFP2017) are written in Fortran.
Although Fortran is one of the oldest programming languages, there have been many versions over the years: FORTRAN, FORTRAN II, FORTRAN III, FORTRAN IV, FORTRAN 66, FORTRAN 77, Fortran 90 (they lost the all caps), Fortran 95, Fortran 2003, Fortran 2008, and the latest, Fortran 2018.
 
  • Like
Likes aaroman, DrClaude, QuantumQuest and 1 other person
  • #6
Svein
Science Advisor
Insights Author
2,274
787
Well, for masochists there is always APL...
 
  • Haha
  • Like
Likes jedishrfu and phinds
  • #8
14,297
8,343
I second @Mark44 comment on Fortran. It’s so ubiquitous that while few folks program in Fortran, there are a lot of folks running Fortran computational models for their work. Even Julia has a scheme to interoperate with Fortran, C/C++, Python and R all of which are used in Data Science today.
 
  • #9
exmarine
241
10
Wow, thanks for the responses. I’ll see if I can answer them.

Back in engineering, I wrote finite element programs for dynamic analyses. Those involve large matrices of course. Someone invented a good term to describe a lot of what I did (John Holquist maybe, or Seymour Cray back in his CDC days?). I “vectorized” my arrays and then did the calculations down in assembly. (Borland’s Delphi Pascal allowed me to do that seamlessly. No hassle about addressing, calling conventions, stack cleanup, big-endian, etc.!)

Now that I am retired and finally get to study physics, I am interested in astrophysics and cosmology. I have Maxima for the General Relativity tensor stuff. I am interested in N-body analyses of galaxies with Newtonian dynamics for example. My preliminary BASIC routines in the back of Excel are a little clumsy, but as one of you said, amazingly fast compared to the old days.

My operating system is Windows here on my laptop. Yes another is correct: I have not been paying attention to the latest in Fortran. I have about a metric ton of old FORTRAN legacy code, eigenvalue routines and such. Have they modernized their “common” storage? What a total nightmare that was.

So I was wondering what modern compiler I should look at for more ambitious programing. I hear a grandson talk about Python, so maybe that would be a good choice. I assume it is “visual” and a compiler, not just an interpreter? Is it remotely kin to PASCAL, which quickly became my all-time favorite after many years of FORTRAN and then BASIC? Is the compiler free, or must it be purchased (a serious consideration when retired!)? Who makes the best one?

Thanks again.
 
  • #10
QuantumQuest
Science Advisor
Insights Author
Gold Member
926
483
Well, I'll definitely second @Mark44 for Fortran although I'm not a Fortran programmer. Fortran power is fairly evident in a vast number of scientific and engineering applications.

I agree on this

Or BASIC, I outgrew it around 1990 when I realized they were NEVER going to allow me to use huge matrices.

although it must be noted that Microsoft has improved its technologies by leaps and bounds since then.
But I won't agree on this

Or “C”, I never warmed up to that “Cryptic” language

C is extremely concise but not cryptic, at least for anyone devoting the time to learn it correctly or in any case, sufficiently enough. There is a good number of optimized compilers for C / C++ doing a very decent job in a large number and span of applications and there is always the way of optimized assembly code as @.Scott points out. I really cannot find a reason to dislike this option.
 
Last edited:
  • #11
41,324
18,944
What is the best compiler these days – for intensive calculations?

What do you mean by "intensive calculations"?

I hear a grandson talk about Python, so maybe that would be a good choice. I assume it is “visual” and a compiler, not just an interpreter?

The term "compiler" is the wrong one to use in this discussion. The term you want is "language". Yes, Python has a thing called a "compiler", but it just compiles Python source code into byte code, and it's completely invisible to you unless you want to delve into the internals of the Python interpreter. "Just an interpreter" vastly understates what you are getting with a language like Python (see the next paragraph), and there is no need on modern computers to have a separate compilation step, so there is no reason to focus on "compilers" instead of just on languages.

The other term you want is "REPL", which stands for "read-eval-print loop"--i.e., an interactive interpreter where you can type code and have its results displayed to you immediately. Once you have used one, you will not want to program in a language that doesn't have it; the value of a REPL for experimentation and testing to make sure code is really doing what you think it does is immeasurable.

I personally use Python for pretty much any programming project; the numpy and scipy packages provide enough horsepower for most people's needs even for "intensive computations".
 
  • #12
vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
15,830
2,477
Well, for masochists there is always APL...
I loved APL. C, on the other hand, is for masochists.
 
  • #13
Vanadium 50
Staff Emeritus
Science Advisor
Education Advisor
29,954
15,647
The requirement seems to be more "a language I will like" than "best for intensive calculations".

If you like Pascal, why not stick with it? Lots of choices - FreePascal and GCC are two.

If you really need intensive calculations, you want something that supports parallelism and offloading to GPUs. Otherwise you are not using the bulk of your computer's processing. That pretty much means C, C++ or FORTRAN, I'm afraid. Alternatives to these three mean you need to know more computer science which you've already said you don't want.
 
  • Like
Likes aaroman and QuantumQuest
  • #14
skeptic2
1,771
59

Suggested for: What is the best compiler now for intensive calculations?

  • Last Post
Replies
1
Views
172
Replies
18
Views
809
Replies
12
Views
340
  • Last Post
Replies
16
Views
827
  • Last Post
Replies
1
Views
496
  • Last Post
Replies
5
Views
488
Replies
0
Views
697
  • Last Post
Replies
6
Views
567
Replies
4
Views
539
Top