Parallel programming in Go and Scala: A performance comparison
Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
This thesis provides a performance comparison of parallel programming in Go and Scala. Go supports concurrency through goroutines and channels. Scala have parallel collections, futures and actors that can be used for concurrent and parallel programming. The experiment used two different types of algorithms to compare the performance between Go and Scala. Parallel versions of matrix multiplication and matrix chain multiplication were implemented with goroutines and channels in Go. Matrix multiplication was implemented with parallel collections and futures in Scala, and chain multiplication was implemented with actors.
The results from the study shows that Scala has better performance than Go, parallel matrix multiplication was about 3x faster in Scala. However, goroutines and channels are more efficient than actors. Go performed better than Scala when the number of goroutines and actors increased in the benchmark for parallel chain multiplication.
Both Go and Scala have features that makes parallel programming easier, but I found Go as a language was easier to learn and understand than Scala. I recommend anyone interested in Go to try it out because of its ease of use.
Place, publisher, year, edition, pages
2015. , 56 p.
Go, Scala, parallelism, concurrency
IdentifiersURN: urn:nbn:se:bth-996OAI: oai:DiVA.org:bth-996DiVA: diva2:824741
Subject / course
PA1418 Bachelor's Thesis - Large Team Software Engineering Project
PAGPT Software Engineering