Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Scala Programming

You're reading from  Learning Scala Programming

Product type Book
Published in Jan 2018
Publisher Packt
ISBN-13 9781788392822
Pages 426 pages
Edition 1st Edition
Languages
Author (1):
Vikash Sharma Vikash Sharma
Profile icon Vikash Sharma

Table of Contents (21) Chapters

Title Page
Packt Upsell
Contributors
Preface
1. Getting Started with Scala Programming 2. Building Blocks of Scala 3. Shaping our Scala Program 4. Giving Meaning to Programs with Functions 5. Getting Familiar with Scala Collections 6. Object-Oriented Scala Basics 7. Next Steps in Object-Oriented Scala 8. More on Functions 9. Using Powerful Functional Constructs 10. Advanced Functional Programming 11. Working with Implicits and Exceptions 12. Introduction to Akka 13. Concurrent Programming in Scala 14. Programming with Reactive Extensions 15. Testing in Scala 1. Other Books You May Enjoy Index

Parallel collections in Scala


It's obvious that if the number of elements in a collection is very large, then you would want to minimize the time it takes to manipulate the collection data. That's where breaking down the tasks and executing them parallel is an option, and a good one. Scala provides parallelism in the form of parallel collections, which works like a charm in scenarios where we have to deal with a big chunk of data. The good thing is that our  par method can easily convert a normal sequential collection to its parallel counterpart implicitly, and the map,fold, and filter methods work great with parallel collections as well.

Understanding the architecture of parallel collections, or how these work on JVM, is out of the scope of this book. We'll keep our discussion limited to concrete implementations of parallel collections, and how we can use them in Scala. If you're into understanding parallel collections, Scala's documentation gives a brief overview at http://docs.scala-lang...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}