You learned a few techniques and features in Scala that can make code execution faster and more efficient. A lazy variable postpones the binding of the variable to the last possible moment it’s first needed. You learned how to convert from a strict collection to its lazy view, how to use infinite and finite streams, and how to make use of parallel collections. You also picked up a few pointers on when to use them and when to avoid them.
We’ve merely scratched the surface of efficiency. In the next chapter we’ll take on concurrent programming.
[5] |
18.219.35.128