+ 6

Guys,What are the best tips to write efficient code in c++?

10th Jul 2017, 5:07 PM
MANOJ KUMAR
MANOJ KUMAR - avatar
2 Answers
+ 7
utilize loops, functions, classes, c++ library, etc
10th Jul 2017, 5:32 PM
Daniel Hisa (1,2,3, Let'sCode!)
Daniel Hisa (1,2,3, Let'sCode!) - avatar
+ 2
Pass by reference for structs or objects, inline small functions that are called a lot, don't declare a local variable until you are actually going to use it so you can save registers or stack instructions, keep parameters you pass to a function minimal, use the appropriate calling convention
10th Jul 2017, 11:02 PM
aklex
aklex - avatar