Hi, Gregor. This is strange. I've backported two packages (mimalloc and prometheus-cpp) to ubuntu bionic. After that I've noticed a huge performance degradation compared to local builds in /usr/local. After that I investigated the issue and found out that both packages do not specify CMAKE_BUILD_TYPE during build and after I've added it into debian/rules the performance was restored.
Well, maybe debhelper in bookworm has other defaults then it has in ubuntu. Sorry if I'm wrong. сб, 11 февр. 2023 г. в 00:12, Gregor Jasny <gja...@googlemail.com>: > Hello, > > On 10.02.23 16:44, Max Dmitrichenko wrote: > > The CMakeList.txt of the library doesn't contain default > CMAKE_BUILD_TYPE to be set to Release. Neither this variable is not set in > debian/rules file. So the resulting library is build with no optimization > enabled which hits performance by factor of around 2x. > > > Setting CMAKE_BUILD_TYPE to None and using the distribution default > C(XX)FLAGS is what debhelper defaults to [1]. > > In the prometheus-cpp build logs [2] I can see that the "-O2" > optimization flags get applied. > > How did you measure the performance degradation? > > Thanks, > Gregor > > [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701233#27 > [2] > > https://buildd.debian.org/status/fetch.php?pkg=prometheus-cpp&arch=amd64&ver=1.0.1-1&stamp=1653219882&raw=0 > > > -- With best regards Maksim Dmitrichenko