This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Perf : put all the code in one source file only ?
- From: Alain Meunier <deco33 at hotmail dot fr>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Sun, 3 Aug 2014 09:37:52 +0200
- Subject: RE: Perf : put all the code in one source file only ?
- Authentication-results: sourceware.org; auth=none
- References: <bn88y4h037nanottoun7i38u dot 1407003151444 at email dot android dot com>
Thanks,
Why would I use flto with a single file at the first place ?
________________________________
> Date: Sat, 2 Aug 2014 14:12:31 -0400
> Subject: RE: Perf : put all the code in one source file only ?
> From: n8tm@aol.com
> To: deco33@hotmail.fr; gcc-help@gcc.gnu.org
>
> Single file permits some auto inlining even without flto.
>
> Tim Prince
>
>
> -------- Original message --------
> From: Alain Meunier <deco33@hotmail.fr>
> Date:
> To: gcc-help@gcc.gnu.org
> Subject: Perf : put all the code in one source file only ?
>
>
> Hello,
>
> My question is purely theorical : what are the eventual disadvantages
> of putting a lot of functions in the same main.c file instead of
> spanning them into multiple static libraries ?
>
> How will gcc sort this out ?
>
> This question is neither related to maintainability, nor readability,
> nor executable size, nor ram usage.
>
> Just performance.
>
> Will the code units play a role or something ? Or whatever I don't think of ?
>
> Will the perf will be the same ?
>
> Thanks,
>