Jump to content

User talk:Kim Bruning/Compiler metaprogramming example

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Josh Cherry (talk | contribs) at 03:18, 15 June 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

I'd originally intended to see what would happen if I tried -funroll-loops (and no I wouldn't have put all of *THAT* expected result into wikipedia), but to my surprise, there was no difference in the output of g++. Apparently there are still some things I don't undestand about gcc, can anyone help?

Turns out that by default GCC doesn't unroll loops that are too large (have too many iterations). This is actually logical/useful, since otherwise such an unrolled loop might not fit into the processor-cache of the specific target processor.(Loop unrolling is supposed to be an Optimisation )) . At some point it might be interesting to get gcc to work like that, and modify the example page.


So every time I write a c++ program and compile it I'm doing compiler metaprogramming? Josh Cherry 03:18, 15 Jun 2004 (UTC)