[Development] Using string literals in autotests

Friedemann Kleint Friedemann.Kleint at qt.io
Thu Mar 28 12:14:35 CET 2024


Hi,

I'd say performance should be a consideration for autotests since they 
are compiled and run over and over again in the CI. So, string theory 
should be applied to avoid unnecessary conversions and allocations. Even 
it is considered a minor optimization, it will have an impact on energy 
consumption & CO2 emission in the end, IMO.

Of course, writing a sophisticated template squeezing out the last bit 
of runtime performance on which the compiler has to chew for a while 
does not help either, since the test is typically compiled and run once.

Surely, the Foundation Team is in the process of creating instructive 
documentation on string theory?

Regards, Friedemann

-- 

Friedemann Kleint
The Qt Company GmbH



More information about the Development mailing list