+ 3

How i can make my code faster?

How i can optimize my code?? I know only “define” and binary operations. Please help me improve my skills...

21st May 2019, 9:33 PM
TimothyRehenel
3 ответов
21st May 2019, 9:43 PM
Alessio Benvenuti
Alessio Benvenuti - avatar
+ 5
First, it's important to understand that there are global optimizations, and there are local optimizations. You will get 99% of the "faster" from the global optimizations, but those tend to be optimizations in design of an application, a component, or a data structure. Good architects and coders understand this inherently, and pick the "correct" data structures and algorithms because it's just so bleeding obvious that any other choices would be horrible; getting to that level of proficiency takes a good deal of experimentation, reading (start withBig O notation), testing (yes, you writing lots of performance tests), and making more than your fair share of mistakes (which is my own personal super-power). The other 1% of "faster" is just as important, but it comes as part of the coding step, and thus is not just inherent in the design or architecture of a system. Here again, mastery takes a great deal of investment, and reading (i.e. until you understand) other peoples' code ..
21st May 2019, 9:45 PM
Troy🌹
Troy🌹 - avatar
+ 4
If you only know define and binary operations I think you better learn more language constructs before you start optimising code.
21st May 2019, 10:24 PM
Sonic
Sonic - avatar