Thanks Jim! Great to see an independent compilation and optimization of my engine!
Surprisingly, the BMI2 build actually seems to perform best on my machine (Zen 4), and it seems it provides a nice performance uplift and a couple of Elo strength improvement compared to my own compille.
When running perft, BMI2 has 20% better performance than AVX512! I assume the AVX builds are also built with BMI2 support, right? Jus surprising that AVX slows things down!
Are these clang profile-guided optimization builds?
And I'm curious, how did you handle the PDEP/PEXT intrinsics for the SSE builds? Are you swapping in a library that emulates these instructions?
Also, I like the logo! Did you make it? Do you mind if I use it too?
Thanks Jim! Great to see an independent compilation and optimization of my engine!
Surprisingly, the BMI2 build actually seems to perform best on my machine (Zen 4), and it seems it provides a nice performance uplift and a couple of Elo strength improvement compared to my own compille.
When running perft, BMI2 has 20% better performance than AVX512! I assume the AVX builds are also built with BMI2 support, right? Jus surprising that AVX slows things down!
Are these clang profile-guided optimization builds?
And I'm curious, how did you handle the PDEP/PEXT intrinsics for the SSE builds? Are you swapping in a library that emulates these instructions?
Also, I like the logo! Did you make it? Do you mind if I use it too?
Hi Joost,
Thanks for testing. They are all clang pgo builds. The AVX2 compile was targeting Zen2 so without BMI2. I used 'Simde Everywhere' libraries for AVX2/SSE3/4 - https://github.com/simd-everywhere/simde but modified it a bit by adding ZP7 libraries for PEXT/PDEP
support also - https://github.com/zwegner/zp7
I had to make a few changes to the code to compile with clang, it doesn't understand 'std::views::join_with'. My download includes the modified source code.
Jim Ablett wrote: ↑Wed Mar 26, 2025 8:59 am
Hi Joost,
Thanks for testing. They are all clang pgo builds. The AVX2 compile was targeting Zen2 so without BMI2. I used 'Simde Everywhere' libraries for AVX2/SSE3/4 - https://github.com/simd-everywhere/simde but modified it a bit by adding ZP7 libraries for PEXT/PDEP
support also - https://github.com/zwegner/zp7
I had to make a few changes to the code to compile with clang, it doesn't understand 'std::views::join_with'. My download includes the modified source code.
Glad you like the logo. Free to use of course.
Jim.
Thanks for the info! That would explain why avx2 is worse. But I think avx512 would still include BMI, right?
As for clang, I actually use that for the main release too (clang-cl on windows), though no PGO. I use clang-19, though I previously tested with clang-18 too. For those compiler it should work, as long as you set the C++23 flag (the included cmake configuration does this).
Jim Ablett wrote: ↑Wed Mar 26, 2025 8:59 am
Hi Joost,
Thanks for testing. They are all clang pgo builds. The AVX2 compile was targeting Zen2 so without BMI2. I used 'Simde Everywhere' libraries for AVX2/SSE3/4 - https://github.com/simd-everywhere/simde but modified it a bit by adding ZP7 libraries for PEXT/PDEP
support also - https://github.com/zwegner/zp7
I had to make a few changes to the code to compile with clang, it doesn't understand 'std::views::join_with'. My download includes the modified source code.
Glad you like the logo. Free to use of course.
Jim.
Thanks for the info! That would explain why avx2 is worse. But I think avx512 would still include BMI, right?
As for clang, I actually use that for the main release too (clang-cl on windows), though no PGO. I use clang-19, though I previously tested with clang-18 too. For those compiler it should work, as long as you set the C++23 flag (the included cmake configuration does this).
H:\Engines\c\CuckooChess\CuckooChess 1.12 dev_49cd170 JA>"CuckooChess 1.12 dev_49cd170 JA.exe"
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\User\AppData\Local\warp\packages\CuckooChess 1.12 dev_49cd170 JA.exe\Java\bin\nio.dll: Can't find dependent libraries
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:259)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:249)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:234)
at java.base/jdk.internal.loader.BootLoader.loadLibrary(BootLoader.java:149)
at java.base/sun.nio.fs.WindowsNativeDispatcher.<clinit>(WindowsNativeDispatcher.java:1099)
at java.base/sun.nio.fs.WindowsFileAttributes.get(WindowsFileAttributes.java:299)
at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:51)
at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:197)
at java.base/java.nio.file.Files.readAttributes(Files.java:1865)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1512)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:744)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:254)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:181)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:255)
at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:830)
at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:732)
H:\Engines\c\CuckooChess\CuckooChess 1.12 dev_49cd170 JA>"CuckooChess 1.12 dev_49cd170 JA.exe"
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\User\AppData\Local\warp\packages\CuckooChess 1.12 dev_49cd170 JA.exe\Java\bin\nio.dll: Can't find dependent libraries
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:259)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:249)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:234)
at java.base/jdk.internal.loader.BootLoader.loadLibrary(BootLoader.java:149)
at java.base/sun.nio.fs.WindowsNativeDispatcher.<clinit>(WindowsNativeDispatcher.java:1099)
at java.base/sun.nio.fs.WindowsFileAttributes.get(WindowsFileAttributes.java:299)
at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:51)
at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:197)
at java.base/java.nio.file.Files.readAttributes(Files.java:1865)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1512)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:744)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:254)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:181)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:255)
at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:830)
at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:732)
Thanks,
Alex
Sorry, my method of creating the executable is no longer working in Windows 11.
I will try creating it on an older system and post working executable later.