- [Man] Let's take a moment to talk about inline code.…This is usually an optimization that happens…during compiling when referenced methods…are added directly to the caller.…Normally this is the job of the compiler itself.…But sometimes the compiler isn't smart enough to know…when to correctly inline your own code.…This can actually be done manually to help speed…up performance in some use cases.…This is called micro-optimization.…Micro-optimization is the process…of meticulously tuning small sections of code…in order to address a perceived deficiency…in some aspect of its operation: excessive memory usage,…poor performance, and the list goes on.…
Let's take a look at this example and see how it…executes with all the code inline.…As you can see, we're going back to an earlier example…of where we're going to append a string into a string…builder and see how long it takes to execute.…But what's changed is that we've now wrapped…this code in another four loop.…We want to perform this acton a thousand times,…so our outer loop is a thousand loops,…
Released
3/14/2018- Creating a baseline
- Removing unused code
- Refactoring in branches
- Using refactoring tools
- Optimizing code
- Creating clean code
Share this video
Embed this video
Video: Inlining code