
First of - thanks for a very simple example illustrating the problem. This has allowed me to say right of the bat that I can't imagine what might be going on here - thereby saving us all lots of time. Bill Lear wrote:
Here is the strange part: When using the Intel compiler, and run with the text and xml archive headers commented out, the load method takes about 9.6 seconds. When I uncomment the text and xml headers, the load time almost doubles, to 18.8 seconds or so. I do not see this with gcc.
So the question is: have I done something foolish here, or is this wacky?
It certainly looks wacky to me. It would seem that a lot of code is getting instantiated and invoked even though the archive is never used.
I am using the following command to compile the code:
% icpc -O2 -Ob2 -ip <...>
Any help appreciated.
By me as well. This would require pretty determined sleuthing. Here are some suggestions - in no particular order. How does the size of the executable vary. It shouldn't - but if it does that would indicate extra code being instantiated. Does the linker produce a "map" of some sort - this might indicate differences in code instantiation. I'm assuming it compiled for the "appropriate" optimization level. Lower optimization levels leave in lots of code useful only for debugging. This is especially true with templates. Is there an execution time profiler facilty available which shows which functions are consuming how much time. Intel prides itself on its tools in this area. That might be very help to check these out. Let us know what you find out. Robert Ramey