I’m running CMake 4.0.0 on identical settings as I was doing with CMake 3.31.6 and all the configure times in my projects are equal or worse than before. After doing some profiling, most of it looks identical except some find_package calls. For example this call:
goes from around 30 ms to more than 70 ms, that’s more than double and in general all calls are equal or worse, with the worst cases being 2x slower or even more.
I’m using the cmake that is available on Arch Linux. I have checked that it doesn’t seem the build options have changed, so I think this may be caused by cmake itself.
A very complex command-line CMake-based script tokenizing ~4000 lines of CMake code running it 3-times:
CMake 3.31.6:
7.017641 sec
6.892121 sec
6.910700 sec
CMake 4.0.0:
7.040688 sec
6.926531 sec
7.007777 sec
I would say, the performance is completely the same in my case. There might be a slight deviation here and there due to other tasks running locally - browser/music etc. Difficult to say something concrete for every case out there though.
Thanks Peter for the numbers. What I see however is that when configuring with CMake 4.0.0 it is always equal or slower, which agrees with what I saw. It’s not a lot but I would like if performance doesn’t get worse. Reading the release notes I couldn’t think there was anything that would have an impact on this.