Re: Inlining methods of published classes inside the lib?
Alexander Neundorf <[email protected]> Thu, 16 Apr 2009 22:03:06 +0200
| Newsgroups | gmane.comp.kde.devel.optimize |
|---|---|
| Message-ID | <[email protected]> |
Hi Friedrich, On Thursday 16 April 2009, Friedrich W. H. Kossebau wrote: ... > ? How big is the cost of a method call compared to a inlined, simple > function, e.g. readonly precalculated data access? So might it have a real > effect? ? What measures could be taken to find gain vs. costs, and how? I checked this once when building for ARM. Everything inlined it was something between 5 and 15 assembler instructions, without inlining it was significantly more (I think it was returning a free element from a pool). So, for really simple functions it is significant. If you change into the directory where the target, e.g. okteta, is built, you can do "make help" there, and then you will see among other also targets to compile all files separately (make file.o) , to preprocess (make file.i) them and to assemble (make file.s) them (actually do everything except assembling...). When you do this you can see what the result will be. Alex