C++Generic ProgrammingLanguage FeatureLearn C++

Testing C++ Builder CLANG and GNU C++ performance by Counting Prime Numbers

In this post we compared runtime performance of C++ Builder Console Application with CLANG Compiler and GCC Compiler.

Prime numbers are interesting area to research. A prime number, it is also called prime shortly , is a natural number (a positive integer)  greater than 1 that is not a product of two smaller natural numbers. If a number is not prime then it is called as a composed number. There are several mathematical questions regarding prime numbers are still unsolved.  Finding them and relations and their effects on some other functions, graphics really interesting in mathematical phenomena. We tested Prime numbers before in this Easily Learn To Find Prime Numbers In Modern C++ post. We have made few changes to check if compiled 32bits or 64bits as below. Here is the Counting Prime Numbers example for a C++ Builder Console Application.

And the results are;

Here below is the Counting Prime Numbers example for a GNU C++ Console Application. We used Visual Studio Code with GCC Compiler on runtime.

And results are;

Get started building powerful apps with C++Builder!

close

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome C++ content in your inbox, every day.

We don’t spam! Read our privacy policy for more info.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial

Free C++Builder Community Edition

About author

33+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux and some other operating systems. Dr. Yilmaz Yoru was born in 1974, Eskisehir-Turkey. He graduated from the department of Mechanical Engineering of Eskisehir Osmangazi University in 1997. One year later he started to work in the same university as an assistant. He received his MSc and PhD degrees from the same department of the same university. He has married and he is a father of a son. Some of his interests are Programming, Thermodynamics, Fluid Mechanics and Artificial Intelligence. He also likes the graphical 2D & 3D design and high-end innovations.
Related posts
C++ComponentsDatabaseIntroduction to C++Language FeatureLearn C++

Get To Know The Powerful C++ Data Bindings In Windows Apps

C++Introduction to C++Language FeatureLearn C++

How to Create a New Windows FMX Static Library In C++

C++C++11C++14C++17Introduction to C++Learn C++

How To Use C++ front() And back() Methods Of Vectors

C++Generic ProgrammingIntroduction to C++Language FeatureLearn C++

5 Things You Need To Know About Optimization In C++ Builder

Worth reading...
Quickly Learn To Count Prime Numbers In GNU C++ On Windows
en_USEnglish