Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #5618
| From | Edek <edek.pieITAKNIECZYTAM@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: efficient function call |
| Date | 2011-05-26 15:53 +0200 |
| Organization | ATMAN - ATM S.A. |
| Message-ID | <irllnn$hdq$1@node2.news.atman.pl> (permalink) |
| References | <b77d43d1-0865-4c3d-9179-6cda0ff992c1@m40g2000vbt.googlegroups.com> <5b9040f8-e35b-4cb0-95c8-1b89838f1da9@s14g2000vbi.googlegroups.com> <irim81$v8d$1@dont-email.me> <579f855a-ff3b-4e65-a977-9773fb58a07c@e35g2000yqc.googlegroups.com> <irleec$po3$1@dont-email.me> |
> But everyone here have been telling you: the function call overhead > for a small function is probably going to be null when optimisation is > turned on because the compiler will inline the function regardles of > the usage of the "inline" keyword. Main topic aside: the above is not always true. Even in the same cpp file, sometimes non-inline functions cannot be inlined, and inline function can (and usually will). Compiler is free to inline a non-inline function only if it can determine it can be sure it knows its body, and this is not true sometimes even in the same cpp file - e.g. on an ELF system when compiling position independent code (Linux, shared library) almost every non-inline function can be replaced during program loading by an arbitrary implementation and gcc must take this into account, so no inlining can be done unless the function is really inline. Edek
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
efficient function call hamze <hamze60@gmail.com> - 2011-05-24 05:52 -0700
Re: efficient function call Victor Bazarov <v.bazarov@comcast.invalid> - 2011-05-24 09:52 -0400
Re: efficient function call yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-05-24 18:28 +0000
Re: efficient function call hamze <hamze60@gmail.com> - 2011-05-24 11:49 -0700
Re: efficient function call Victor Bazarov <v.bazarov@comcast.invalid> - 2011-05-24 15:07 -0400
Re: efficient function call hamze <hamze60@gmail.com> - 2011-05-25 00:37 -0700
Re: efficient function call yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-05-25 10:38 +0000
Re: efficient function call hamze <hamze60@gmail.com> - 2011-05-25 11:08 -0700
Re: efficient function call Dombo <dombo@disposable.invalid> - 2011-05-25 21:38 +0200
Re: efficient function call yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-05-26 11:44 +0000
Re: efficient function call Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-26 15:53 +0200
Re: efficient function call yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-05-27 08:31 +0000
Re: efficient function call Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-05-27 13:45 +0000
Re: efficient function call Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 16:17 +0200
Re: efficient function call Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-05-27 22:38 +0000
Re: efficient function call Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 16:39 +0200
Re: efficient function call Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-24 14:30 -0700
Re: efficient function call hamze <hamze60@gmail.com> - 2011-05-25 00:39 -0700
Re: efficient function call hamze <hamze60@gmail.com> - 2011-05-25 00:20 -0700
csiph-web