Jump to ratings and reviews
Rate this book

Scala High Performance Programming

Rate this book
Scala High Performance Programming

274 pages, Kindle Edition

Published May 31, 2016

10 people are currently reading
121 people want to read

About the author

Vincent Theron

1 book3 followers
Vincent Theron is a professional software engineer with 9 years of experience. He discovered Scala 6 years ago and uses it to build highly scalable and reliable applications. He designs software to solve business problems in various industries, including online gambling, financial trading, and, most recently, advertising. He earned a master's degree in computer science and engineering from Université Paris-Est Marne-la-Vallée. Vincent lives in the Boston area with his wife, his son, and two furry cats.

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
2 (16%)
4 stars
1 (8%)
3 stars
7 (58%)
2 stars
2 (16%)
1 star
0 (0%)
Displaying 1 - 5 of 5 reviews
Profile Image for Rod Hilton.
152 reviews3,116 followers
December 13, 2017
This book contains a lot of great information for Scala programmers, but it's kind of buried in a frustrating reading experience.

A lot of what you'll learn in this book is that many of the ways you use Scala normally are slow, I particularly enjoyed learning how Option, something I take completely for granted but has the potential to hurt performance in critical areas. It's not just a complaint either, the author basically offers an alternative Option implementation that doesn't suffer from this (and also, isn't as expressive, and is basically Java). There are also some great sections about Free Monads and an absolutely fantastic coverage of the differences between Scala collection types and performance. It's a lot deeper than you might think, it's not just "oh this one is O(n) and this one is O(logn)", it's extremely detailed and informative.

The main issues I have with the book are the writing style and the example used for illustration. The writing style is fluffy and feels both padded and out of place. The author basically takes the reader through almost a choose-your-own-adventure story where "you" have started a new job, and you're talking to people to understand their performance issues, and helping them out. They all have names like "Dave from so-and-so department" and it just feels totally unnecessary. He gets in some cracks about "you" avoiding scrum masters to get real work done and how happy you're making this or that group and increasing the company's bottom line. One one point, "You double-check with Gary to confirm that MVT strategies are thread-safe. He responds with a thumbs up emoji, which gives us the green light to parallelize execution of trading strategies." It just feels so out of place, it kind of reads like the author wrote a dry, matter-of-fact book and then someone told him to make it more of a story to keep readers engaged, and then he shoehorned all of this stuff in like it's The Phoenix Project. It's kind of grating.

The other gripe I've got is that there's a single domain example used as a throughline through the entire book: a high-volume stock trading application. I recognize that this is a fitting example because these kinds of applications really REALLY care about throughput, latency, and performance concerns - I have a buddy who used to work at one of these places and they universally insist on using C++ with a lot of assembly callouts to get nanosecond improvements. However, if you basically know fuck-all about the stock market, a lot of the terminology and domain specifics might go over your head, and there's little to no attempt to explain any of it as the author assumes a base level of familiarity with these concepts. This is probably a personal failing on my part because I hate the stock market and I don't mess around with it much, but I found myself occasionally struggling to understand exactly how the domain worked, and since it's critical through the ENTIRE book, this affects the whole reading.

This book is definitely worth skimming, but I'm not sure if it's worth a full sit-down read. I think the sections can largely be read independently, they rarely build on each other so it's worth going through and picking up the areas where you're particularly interested in performance. If you do Scala full-time, it's definitely worth flipping through if only to find out what kinds of things to look out for, so that you can circle back to the book later on if you encounter particular performance issues.
22 reviews1 follower
April 21, 2017
I can only say that this book exceeded my expectations. While it does not provide fundamentally new ideas it approaches the topic very systematically and you can tell that the authors have earned their scars by tuning real systems.

This book puts you into the shoes of a developer that just arrived at her new job.
The first day demands the first performance problem to solve and each following problem is presented in the same entertaining and engaging way.

The reader is introduced to profiling and benchmarking, learns to generate and interprete decompiled byte code, consider allocation and specialisation. Of course the Scala collection API is treated extensively providing a good refresher of functional data structures as well as laziness and streams in an event sourcing environment.. Finally the authors present futures, promises and tasks before they finish with the introduction of a distributed architecture leveraging CRDTs and the free monad and interpreter pattern to provide optimal solutions for different tradeoffs.

The in depth treatment of each of these topics while strongly focusing on the functional subset of Scala makes this a valuable reference for every Scala programmer.

Last but not least it is a fun book to read.
I highly recommend it.
5 reviews
November 8, 2021
I wanted to read a different book. As a heavy abstraction user of Scala, I would like to have insight into which abstractions are introducing unacceptable overhead, how to measure that, and how to adapt JVM tools to cope with Scala code. What I got was a long journey into data structures in Scala, which could have been done in Java for the most part, and free monads introduced in last 10 pages of the book. Also, the age shows - Cats Effect 3 solves some of the problems described differently (and you might have other worries now).
Profile Image for Gábor Bakos.
Author 3 books
November 24, 2017
I found this very useful, interesting. It summarizes very well the usual problems -I was already familiar- regarding Scala performance and he suggests viable alternatives, solutions.
I have to admit the beginning was a bit slow for me, the second half of the book is more enjoyable (though I was reading that part with less interruptions). It worth checking the last chapter too, it introduces interesting ideas.
Profile Image for Eimantas Pečkys.
2 reviews1 follower
April 19, 2019
A mixture of great performance tips (Collections library, Option, Views, Future etc) wrapped into not so great narrative. I recommend to extensively read some of the chapters, while some others could easily be skimmed.
Displaying 1 - 5 of 5 reviews

Can't find what you're looking for?

Get help and learn more about the design.