Site icon Learn 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.

[crayon-66286835b9c99248142779/]

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.

[crayon-66286835b9ca2208949122/]

And results are;

Get started building powerful apps with C++Builder!

Exit mobile version