What is the best compiler now for intensive calculations?

In summary, the best compiler these days is a compromise. It depends on the type of calculations required and the operating system being used.
  • #1
exmarine
241
11
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.
 
Technology news on Phys.org
  • #2
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
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
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
exmarine said:
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
Well, for masochists there is always APL...
 
  • Haha
  • Like
Likes jedishrfu and phinds
  • #7
Svein said:
Well, for masochists there is always APL...
And economists no wait they are masochists...
 
  • #8
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
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.
 
  • Like
Likes pbuk
  • #10
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

exmarine said:
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

exmarine said:
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:
  • Like
Likes Mark44
  • #11
exmarine said:
What is the best compiler these days – for intensive calculations?

What do you mean by "intensive calculations"?

exmarine said:
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
Svein said:
Well, for masochists there is always APL...
I loved APL. C, on the other hand, is for masochists.
 
  • #13
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

1. What is a compiler and what does it do?

A compiler is a software program that translates human-readable code written in a programming language into machine code that can be understood and executed by a computer. It is an essential tool for software development as it allows the code to be run on different hardware and operating systems.

2. Why is it important to choose the best compiler for intensive calculations?

Intensive calculations involve complex mathematical operations and require high performance and efficiency. The right compiler can optimize the code to run faster and use system resources more efficiently, resulting in faster and more accurate calculations.

3. What factors should be considered when choosing the best compiler for intensive calculations?

Some key factors to consider include the type of calculations needed, the programming language used, the target hardware and operating system, and the availability of libraries and tools for optimization. It is also important to consider the compiler's track record for reliability and support.

4. What is currently considered the best compiler for intensive calculations?

The answer to this question may vary depending on individual needs and preferences. Some popular compilers for intensive calculations include Intel Parallel Studio, GNU Compiler Collection (GCC), and LLVM Compiler Infrastructure. These compilers offer advanced optimization techniques and support for various programming languages.

5. Are there any open-source options for compilers for intensive calculations?

Yes, there are several open-source compilers that are suitable for intensive calculations, such as GCC and LLVM. These compilers are free to use and have a strong community of developers constantly working on improvements and updates. They also offer a wide range of features and support for various programming languages.

Similar threads

  • New Member Introductions
Replies
2
Views
201
  • Programming and Computer Science
Replies
29
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
1K
  • Art, Music, History, and Linguistics
Replies
1
Views
1K
  • General Discussion
Replies
12
Views
5K
  • General Math
Replies
13
Views
9K
Back
Top