A recent post by thfr@ compared the compilation time of godot between several different systems. I thought the idea was interesting, so I decided to compare the compile time of OpenBSD's userland on 3 ThinkPads: a 9th Gen X1 Carbon, a T14 AMD, and a T470p.
Relevant specs of the test machines are below:
All of these were running OpenBSD 7.0 and the test was to compile a -current userland from source taken on Octboer 15, 2021. All the machines were running with apm set to maximum performance (-H), and were on the same wooden desk with ambient temperature of 72 degrees Fahrenheit. Test parameters and results are below:
# time make -j4 build
With 4 jobs, the T14 came out on top, but interestingly the nearly brand new X1 was beaten by the much older i5-7300HQ in the T470p. The T470p has a substantially better cooling setup due to its higher TDP, and is a thicker and heavier laptop. If the X1 was throttling due to heat, this could explain the difference here. Since the i7-1165G7 in the X1 supports hyperthreading whereas the i5-7300HQ in the T470p does not, I was curious if SMT would improve things on the X1:
# time make -j8 build
SMT made a very slight difference, shortening the build time by 2 minutes, but this is hardly a dramatic improvement. Next, I wanted to see if giving make 8 jobs and hopefully using all 8 physical cores on the T14's Ryzen 4750U would make a difference:
SMT still disabled
# make -j8 build
It did. We saved about 23 minutes with -j8 as opposed to -j4 on the 8 core 4750U. What if we enable SMT and throw 16 jobs at it?
# make -j16 build
No real difference, and we even lost about 30 seconds.
It's interesting that the i5-7300HQ in a T470p mildly beat the newer i7-1165G7 despite the i7 having better benchmark figures in Geekbench, Passmark, and some other tests and having much faster NVMe storage than the SATA drive in the T470p. The case and heatsink design of the T470p seems to be the difference here, as it has much more generous cooling than the tightly packed X1 Carbon. Granted, the i7-1165G7 needed 30 fewer watts to match the older i5's performance.
Adding physical cores buys the best performance boost for this task, saving 23 minutes when all 8 cores were used on the 4750U. SMT only made a very mild difference with the i7-1165G7, shaving 2 minutes off the build, and it made no difference with the AMD 4750U, even increasing the time very slightly. I'm not sure if this lack of improvement has to do with OpenBSD specifically, or this specific workload.
Final takeaway: LLVM is gargantuan. I'd guess 85% of the time was spent just building that.