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

immintrin.h/x86intrin.h adds significantly to compile times #298

Closed
dirocco opened this issue May 30, 2023 · 3 comments · Fixed by #300
Closed

immintrin.h/x86intrin.h adds significantly to compile times #298

dirocco opened this issue May 30, 2023 · 3 comments · Fixed by #300

Comments

@dirocco
Copy link

dirocco commented May 30, 2023

Due to the verbose nature of the AVX512 headers, my build profile is showing an extra 500ms of frontend compile time in Clang for any header that includes quill.

The main offenders are quill/include/quill/detail/spsc_queue/BoundedQueue.h and quill/include/quill/detail/misc/Rdtsc.h which include immintrin.h and x86intrin.h.

Here is a simple patch to fix the issue:

diff --git a/quill/include/quill/detail/misc/Rdtsc.h b/quill/include/quill/detail/misc/Rdtsc.h
index d4396b8..28ab967 100644
--- a/quill/include/quill/detail/misc/Rdtsc.h
+++ b/quill/include/quill/detail/misc/Rdtsc.h
@@ -16,7 +16,8 @@
   #if defined(_WIN32)
     #include <intrin.h>
   #else
-    #include <x86intrin.h>
+    #include <x86gprintrin.h>
   #endif
 #endif
 
diff --git a/quill/include/quill/detail/spsc_queue/BoundedQueue.h b/quill/include/quill/detail/spsc_queue/BoundedQueue.h
index 67d2af7..81dc6a6 100644
--- a/quill/include/quill/detail/spsc_queue/BoundedQueue.h
+++ b/quill/include/quill/detail/spsc_queue/BoundedQueue.h
@@ -15,7 +15,7 @@
 
 #if defined(QUILL_X86ARCH)
   #include <emmintrin.h>
-  #include <immintrin.h>
-  #include <x86intrin.h>
 #endif
@odygrd
Copy link
Owner

odygrd commented May 31, 2023

thanks for reporting this and for recommending a solution👍 A fix will be in master soon

@dirocco
Copy link
Author

dirocco commented Jun 17, 2023

Wow that header guard is annoyingly broad, thanks for trying anyways.

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

Successfully merging a pull request may close this issue.

2 participants