Intel OneApi C++ Compiler

Started by MrBcx, March 14, 2025, 08:54:19 PM

Previous topic - Next topic

MrBcx

@Quin --- when optimizing for speed ( /O2 ), exe sizes are all comparable .. approx 1.2MB

@JBK --- I'm certain you're right.  The Intel DPC++ compiler is made for data-parallel
C++ code that can run on various hardware -- CPUs, GPUs, and FPGAs but I'm not into that.


jbk

it's my experience that for certain code, the Intel compiler produces exes that are significantly faster than that of MSVC, so I wouldn't discount Intel just yet.

Quin

Cool stuff! Although it is fascinating that you didn't really notice -any- speed improvements. How's the binary size compared with msvc/mingw?

MrBcx

#1
I fed my curiosity today by installing the latest Intel OneApi C++ Compiler for Windows, a LLVM-based compiler that
requires Microsoft Visual Studio integration, in order to access Microsoft's headers, libs, etc, similar to Clang.

Long story short, I successfully built my latest version of BCX using the Intel C++ compiler. 

That's cool and now my curiosity has been satisfied.

The resulting BCX executable runs just as fast as when compiled using the vanilla version of Clang (20.1.0).

In other words, the Intel compiler didn't knock my socks off like I was expecting it to.





C:\Bc>REM Set up Intel compiler environment

C:\Bc>call "C:\Intelc++\2025.0\oneapi-vars.bat"
:: initializing oneAPI environment...
   Initializing Visual Studio command-line environment...
   Visual Studio version 17.13.2 environment configured.
   "C:\Program Files\Microsoft Visual Studio\2022\Community\"
   Visual Studio command-line environment initialized for: 'x64'
:: compiler -- processing etc\compiler\vars.bat
:: debugger -- processing etc\debugger\vars.bat
:: dpl -- processing etc\dpl\vars.bat
:: mkl -- processing etc\mkl\vars.bat
:: tbb -- processing etc\tbb\vars.bat
:: oneAPI environment initialized ::

BCX BASIC to C/C++ Translator (c) 1999-2025 by Kevin Diggins
Version 8.2.6 (03/14/2025) Compiled using Intel C++ (2025.0.4) for 64-bit Windows
[Lines In: 38703] [Lines Out: 41980] [Statements: 34282] [Time: 0.93 Sec's]
BCX translated [Bc.Bas] to [Bc.Cpp] for a C++ Compiler

Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2025.0.4 Build 20241205
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.

Compilation successful!

BCX BASIC to C/C++ Translator (c) 1999-2025 by Kevin Diggins
Version 8.2.6 (03/14/2025) Compiled using Intel C++ (2025.0.4) for 64-bit Windows
[Lines In: 38703] [Lines Out: 41980] [Statements: 34282] [Time: 0.92 Sec's]
BCX translated [Bc.Bas] to [Bc.Cpp] for a C++ Compiler

Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2025.0.4 Build 20241205
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.

Compilation successful!

BCX BASIC to C/C++ Translator (c) 1999-2025 by Kevin Diggins
Version 8.2.6 (03/14/2025) Compiled using Intel C++ (2025.0.4) for 64-bit Windows
[Lines In: 38703] [Lines Out: 41980] [Statements: 34282] [Time: 0.90 Sec's]
BCX translated [Bc.Bas] to [Bc.Cpp] for a C++ Compiler

Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2025.0.4 Build 20241205
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.

Compilation successful!