Performance improvement
Thiago Macieira
thiago at kde.org
Mon May 26 01:06:14 BST 2025
On Thursday, 22 May 2025 22:58:37 Central Daylight Time Igor Mironchik wrote:
> PASS : Test::initTestCase()
> PASS : Test::test_func()
> RESULT : Test::test_func():
> 0.000035 msecs per iteration (total: 75, iterations: 2097152)
> PASS : Test::test_template()
> RESULT : Test::test_template():
> 0.0000045 msecs per iteration (total: 76, iterations: 16777216)
> PASS : Test::cleanupTestCase()
>
> This is a whole order of magnitude.
Use -perf to benchmark tiny optimisations like that. Wall-clock time is not a
good measure when the CPU frequency can change. The -iterations counter helps
if the result is too small.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Principal Engineer - Intel Platform & System Engineering
More information about the kde-devel
mailing list