17 Jul 2008
I tried the Intel C/C++ compiler (icc), 10.1.017, with MC-EZBC, see also my post on PGO with gcc.
icc 10.1.012 failed to compile the code, probably some compatibility issue with the gcc 4.2.3 installed on my system.
The auto-vectorizer has to be disabled (-no-vec
), otherwise the executable crashes.
Apart from that, the results are excellent (decoding 32 frames of the Foreman sequence, Intel Core2 Duo 2.66 GHz):
-DNDEBUG -g -O3 -no-prec-div -static -fomit-frame-pointer -march=core2 -msse3 -no-vec
-ipo
-prof-use
posted at: 14:48 | path: /programming | permanent link
GCC supports profile-guided optimization for some time now. I gave it a try on the MC-EZBC video codec, which certainly can use some speedup from optimization .
To generate an executable which collects runtime information, use
gcc -fprofile-generate -o prog_gen_gpo prog.cThis create files ending in
*.gcda
and *.gcno
in your source tree.
In a second compilation pass, instruct gcc to make use of the runtime profile information
gcc -fprofile-use -o prog prog.cThe profiling options must be given in the compile and link stage!
Results for decoding 32 frames, Foreman sequence, on a Intel Core2 Duo, 2.66 GHz,
compiled with gcc 4.3:
The following CFLAGS -DNDEBUG -O3 -g -march=core2 -fomit-frame-pointer -fprofile-use -msse3 -mfpmath=sse
provide best results,
the new (with gcc 4.3) -march=core2
(or -march=native
) helps at lot (2.1 sec),
-mfpmath=sse
brings 0.5 sec.
For comparison: gcc 4.2.3 -O3 is dead slow, 46.2 sec!
posted at: 13:47 | path: /programming | permanent link
To convert a Postscript files (.ps) to a PDF file and embed all fonts use the command
ps2pdf -dPDFSETTINGS=/prepress -dSubsetFonts=true -dEmbedAllFonts=true paper.ps(the /prepress setting is important);
ps2pdf
comes with the Ghostscript package.
In order to check if all fonts are embedded, run
pdffonts paper.pdfThe emb column indicates whether the fonts is embedded;
pdffonts
comes with
Poppler,
use the poppler-utils package on Ubuntu.
posted at: 13:05 | path: /academic | permanent link