Am 18.08.2015 um 10:19 schrieb Aurelien Jarno:
How big is the source file and the output file? I find strange that I/O
impacts so much for a compilation which should be CPU bounded. Maybe try
to add the -pipe argument to g++.
NetBSD SPARC64, running from ramdisk, qemu 2.4.50
g++ src/pugixml.cpp -g -Wall -Wextra -Werror -pedantic -std=c++0x -c
-MMD -MP
#1: 2:52.6
#2: 2:49.2
g++ src/pugixml.cpp -g -Wall -Wextra -Werror -pedantic -std=c++0x -c
-MMD -MP -pipe
#3: 2:50.2
#4: 2:52.1
pugixml.cpp: 323.273 bytes
pugixml.o: 1.095.832 bytes
pugixml.d: 101 bytes
Stop after the preprocessing stage:
g++ src/pugixml.cpp -g -Wall -Wextra -Werror -pedantic -std=c++0x -c
-MMD -MP -E > pugixml.prep.cpp
runtime: ~5sek
pugixml.cpp.prep: 788.350 bytes
Stop after the stage of compilation proper:
g++ src/pugixml.cpp -g -Wall -Wextra -Werror -pedantic -std=c++0x -c
-MMD -MP -S
runtime #1: 2:40.1
runtime #2: 2:41.0
Compile or assemble the source files, but do not link:
g++ src/pugixml.cpp -g -Wall -Wextra -Werror -pedantic -std=c++0x -c
-MMD -MP -c
runtime: 2:52.6