[cfe-users] optimize template-heavy project with duplicate code removal

2015-09-23 Thread chen xu via cfe-users
Hi, our project heavily uses c++ template, and the resulting executable is almost 1.5G Bytes, which is too big to be acceptable. Adding -O2 or -Os does not seem helping. Is there any way (like link option, etc) to reduce the size? __

Re: [cfe-users] optimize template-heavy project with duplicate code removal

2015-09-24 Thread chen xu via cfe-users
23, 2015 at 4:43 PM, chen xu via cfe-users wrote: Hi, our project heavily uses c++ template, and the resulting executable is almost 1.5G Bytes, which is too big to be acceptable. Adding -O2 or -Os does not seem helping. Is there any way (like link option, etc) to r

Re: [cfe-users] optimize template-heavy project with duplicate code removal

2015-09-24 Thread chen xu via cfe-users
one) On Wed, Sep 23, 2015 at 4:43 PM, chen xu via cfe-users wrote: Hi, our project heavily uses c++ template, and the resulting executable is almost 1.5G Bytes, which is too big to be acceptable. Adding -O2 or -Os does not seem helping. Is there any way (like link op

Re: [cfe-users] optimize template-heavy project with duplicate code removal

2015-09-25 Thread chen xu via cfe-users
emplate parameters where possible - if, for example, a member function of a class template doesn't need all the template parameters - pull it out into a standalone function template that takes fewer template parameters, and call it from the member one) On Wed, Sep 23, 2015 at 4:43 PM, chen xu via