O'Reilly logo

Pragmatic Scala by Venkat Subramaniam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Wrapping Up

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required