![](http://photos1.blogger.com/blogger/1767/1113/320/slow.jpg)
Now, what would happen if we moved a and b out of the main loop and calculated them outside? The first thought that comes to mind is that performance would suffer since we increase the total number of operations:
![](http://photos1.blogger.com/blogger/1767/1113/400/fast.jpg)
However, the second scenario executes faster...as much as 5 times! That may mean the difference between life and death if you have execution time constraints. Another leaky abstraction at work...
mp3:
Cassius - Toop toop
Murat Boz - Aşkı bulamam ben
MFÖ - Sarı laleler
Randy Newman - Rider in the rain
No comments:
Post a Comment