Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Really slow compilation with large maps #17041

Open
fbarbari opened this issue Feb 18, 2025 · 0 comments
Open

Really slow compilation with large maps #17041

fbarbari opened this issue Feb 18, 2025 · 0 comments

Comments

@fbarbari
Copy link

Hello, I am experiencing a really slow compilation time with OneAPI 2024 on a single file which initializes some constant unordered_maps.

The source code is quite large (~4500 lines), so I just put it on Compiler Explorer.

The full command is this:

icpx -O1 -std=c++17 -fPIC -fno-fast-math -fsanitize=address,undefined -Wall -Wextra -pedantic -Wsign-conversion -Wfloat-conversion -Wfloat-equal -Wno-unknown-pragmas -Werror example.cpp -o example.x

Here are some compilation times measured with time.

OneAPI 2024.2.0.495:

real	16m51.163s
user	16m49.798s
sys	0m0.890s

OneAPI 2025.0.4.20:

real	15m40.380s
user	15m39.558s
sys	0m0.509s

clang++ 19.1.7:

real	0m39.850s
user	0m39.226s
sys	0m0.576s

I didn't measure the compilation time for g++ 14.2 but it surely is less than the time limit on Compiler Explorer as you can see here.

If it may be of any help, I also tried disabling optimizations and sanitizers and gathered these times:

Flags Time [s]
<other flags> -O0 ~12
<other flags> -O1 ~47
<other flags> -O0 -fsanitize=address,undefined ~8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant