On 11/27/19 1:22 PM, Daniel P. Berrangé wrote:
On Fedora 31 with GCC 9.2.1, compiling qemuxml2argvtest takes
about 36 seconds since
commit 30c6d99209cd36bba8e14795622f658827698522
Author: Jiri Denemark <jdenemar(a)redhat.com>
Date: Thu Oct 24 17:51:42 2019 +0200
qemuxml2argvtest: Update host arch for DO_TEST*ARCH* tests
The optimizer is hitting some pathelogical performance behaviour due to
the high number of branches in the mymain() method.
Pushing the branch tests down into the testCompareXMLToArgv method
brings the compile time down to 3 seconds.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
In my Fedora 31 box, 'make' time of qemuxml2argvtest.c with this patch:
real 0m4.113s
user 0m3.838s
sys 0m0.360s
Without it:
real 0m35.099s
user 0m34.573s
sys 0m0.544s
Reviewed-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>