View Single Post
Old 20 November 2019, 20:47   #47
Tom_Goblins
Registered User
 
Join Date: Dec 2018
Location: Seattle
Posts: 13
Quote:
Originally Posted by bebbo View Post
for 'smaller' c++:


- don't use std::streams
- use -fno-exceptions -fno-rtti - unless you are really using excpetions/rtti
- use -flto
- move non-inlineable member functions into a corresponding cpp file
- use base classes - even for templates - with common code in cpp files
- don't use codesize increasing c++ features because these exist or you think it's cool... - but use these if it's a real benefit

Thanks for the tips, basically I am using some of them, my debug exe is huge, but release is under 50K, which I can do better but good enough to keep going.

I use c++ but close to simple C to avoid that library explosion. but as today, I don't see much benefits on doing the project on plain C. C++ has a bad reputation, in part I think for people getting lost on complex and obscure language constructions. But c++ can be as plain and simple as C in IMHO.
Tom_Goblins is offline  
 
Page generated in 0.04202 seconds with 11 queries