SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
Parallel collections i
      Scala 2.9
      Alf Kristian Støyle
      Know IT Objectnet
http://www.nassaulibrary.org/ncla/nclacler_files/LILC7.JPG
http://schoolchat.wordpress.com/2008/04/22/keeping-pollution-levels-low/
Embarrassingly parallel
Fork/Join
Work stealing
Double-ended queue - deque
Double-ended queue - deque
Double-ended queue - deque
val persons: List[Person] = ...
val (kids, adults) = persons.partition(_.age < 18)
val paralellList = List(1, 2, 3).par
val paralellList = List(1, 2, 3).par
val sequentialList = paralellList.seq
•
   parallel arrays - scala.collection.parallel.mutable.ParArray

 •
   parallel ranges - scala.collection.parallel.immutable.ParRange

 •
   parallel hash maps - scala.collection.parallel.mutable.ParHashMap

 •
   parallel hash sets - scala.collection.parallel.mutable.ParHashSet

 •
   parallel hash tries - scala.collection.parallel.immutable.{ParHashMap, ParHashSet}

 •
   parallel vectors - scala.collection.parallel.immutable.ParVector




                                http://www.scala-lang.org/node/8976
REPL demo
(https://gist.github.com/919224)
Q &A

Contenu connexe

En vedette

Lecture 2
Lecture 2Lecture 2
Lecture 2
Mr SMAK
 
Tour d’horizon de scala
Tour d’horizon de scalaTour d’horizon de scala
Tour d’horizon de scala
Benoit Wilcox
 

En vedette (7)

Présentation Eurocloud France - Cloud computing en France - Cédric Mora
Présentation Eurocloud France - Cloud computing en France - Cédric MoraPrésentation Eurocloud France - Cloud computing en France - Cédric Mora
Présentation Eurocloud France - Cloud computing en France - Cédric Mora
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Presentation on flynn’s classification
Presentation on flynn’s classificationPresentation on flynn’s classification
Presentation on flynn’s classification
 
Introduction à scala
Introduction à scalaIntroduction à scala
Introduction à scala
 
Présentation (brève) de scala
Présentation (brève) de scalaPrésentation (brève) de scala
Présentation (brève) de scala
 
Tour d’horizon de scala
Tour d’horizon de scalaTour d’horizon de scala
Tour d’horizon de scala
 
HUB REPORT - L'indispensable à savoir sur la Data & le CRM
HUB REPORT - L'indispensable à savoir sur la Data & le CRM HUB REPORT - L'indispensable à savoir sur la Data & le CRM
HUB REPORT - L'indispensable à savoir sur la Data & le CRM
 

Similaire à Paralell collections in Scala

Scalable Applications with Scala
Scalable Applications with ScalaScalable Applications with Scala
Scalable Applications with Scala
Nimrod Argov
 
Scala In The Wild
Scala In The WildScala In The Wild
Scala In The Wild
djspiewak
 
Taxonomy of Scala
Taxonomy of ScalaTaxonomy of Scala
Taxonomy of Scala
shinolajla
 
(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?
Tomasz Wrobel
 
Live coding scala 'the java of the future'
Live coding scala 'the java of the future'Live coding scala 'the java of the future'
Live coding scala 'the java of the future'
Xebia Nederland BV
 
楽々Scalaプログラミング
楽々Scalaプログラミング楽々Scalaプログラミング
楽々Scalaプログラミング
Tomoharu ASAMI
 

Similaire à Paralell collections in Scala (20)

Scala parallel-collections
Scala parallel-collectionsScala parallel-collections
Scala parallel-collections
 
Scala parallel-collections
Scala parallel-collectionsScala parallel-collections
Scala parallel-collections
 
Scalable Applications with Scala
Scalable Applications with ScalaScalable Applications with Scala
Scalable Applications with Scala
 
Scala intro for Java devs 20150324
Scala intro for Java devs 20150324Scala intro for Java devs 20150324
Scala intro for Java devs 20150324
 
Scala In The Wild
Scala In The WildScala In The Wild
Scala In The Wild
 
Taxonomy of Scala
Taxonomy of ScalaTaxonomy of Scala
Taxonomy of Scala
 
Getting Started With Scala
Getting Started With ScalaGetting Started With Scala
Getting Started With Scala
 
Scala for the doubters. Максим Клыга
Scala for the doubters. Максим КлыгаScala for the doubters. Максим Клыга
Scala for the doubters. Максим Клыга
 
Scala for Java Developers (Silicon Valley Code Camp 13)
Scala for Java Developers (Silicon Valley Code Camp 13)Scala for Java Developers (Silicon Valley Code Camp 13)
Scala for Java Developers (Silicon Valley Code Camp 13)
 
Introduction to Scala | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Scala | Big Data Hadoop Spark Tutorial | CloudxLabIntroduction to Scala | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Scala | Big Data Hadoop Spark Tutorial | CloudxLab
 
Scala for Java Programmers
Scala for Java ProgrammersScala for Java Programmers
Scala for Java Programmers
 
A bit about Scala
A bit about ScalaA bit about Scala
A bit about Scala
 
Stepping Up : A Brief Intro to Scala
Stepping Up : A Brief Intro to ScalaStepping Up : A Brief Intro to Scala
Stepping Up : A Brief Intro to Scala
 
The Scala Programming Language
The Scala Programming LanguageThe Scala Programming Language
The Scala Programming Language
 
Scala training workshop 02
Scala training workshop 02Scala training workshop 02
Scala training workshop 02
 
Cassandra and Rails at LA NoSQL Meetup
Cassandra and Rails at LA NoSQL MeetupCassandra and Rails at LA NoSQL Meetup
Cassandra and Rails at LA NoSQL Meetup
 
Java 8: more readable and flexible code
Java 8: more readable and flexible codeJava 8: more readable and flexible code
Java 8: more readable and flexible code
 
(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?
 
Live coding scala 'the java of the future'
Live coding scala 'the java of the future'Live coding scala 'the java of the future'
Live coding scala 'the java of the future'
 
楽々Scalaプログラミング
楽々Scalaプログラミング楽々Scalaプログラミング
楽々Scalaプログラミング
 

Plus de Alf Kristian Støyle (8)

Learning Lisp
Learning LispLearning Lisp
Learning Lisp
 
Clojure workshop
Clojure workshopClojure workshop
Clojure workshop
 
Into Clojure
Into ClojureInto Clojure
Into Clojure
 
Clojure - JVM språket som er "multi-core ready"
Clojure - JVM språket som er "multi-core ready"Clojure - JVM språket som er "multi-core ready"
Clojure - JVM språket som er "multi-core ready"
 
Dependency injection in Scala
Dependency injection in ScalaDependency injection in Scala
Dependency injection in Scala
 
Scala ntnu
Scala ntnuScala ntnu
Scala ntnu
 
Scala introduction
Scala introductionScala introduction
Scala introduction
 
The account problem in Java and Clojure
The account problem in Java and ClojureThe account problem in Java and Clojure
The account problem in Java and Clojure
 

Paralell collections in Scala