I have a performance problem with a multi-threaded (CPU and memory intensive, not I/O intensive) program on a 1950X (ASUS PRIME X399-A motherboard,
Corsair Vengeance LPX DDR4 4x16GB@3000 MHz memory): the performance drops by 50% when going from one to four threads. After having excluded semaphore locks and such as the cause of the problem I decided to run the same program on an Intel i7-7820HQ (Dell Precision 7520 motherboard, DDR4 4x16GB@2400MHz memory) in which case the performance drops by only 10%. OS is ubuntu 18.04, kernel version is 4.15.0-38-generic, GCC version is 7.3.0.
Any ideas what could be causing this difference/how I can improve the multi-threaded performance on the 1950X?