concept parallelization in category functional programming

appears as: parallelization
Functional Programming with Kotlin

This is an excerpt from Manning's book Functional Programming with Kotlin.

Summing integers in practice is so fast that parallelization imposes more overhead than it saves. But simple examples like this are exactly the kind that are most helpful to consider when designing a functional library.

Functional Programming in Java: How functional techniques improve your Java programs

This is an excerpt from Manning's book Functional Programming in Java: How functional techniques improve your Java programs.

First, you must break the list into sublists, and you must do this automatically. One important question is how many sublists you should obtain. At first glance, you might think that one sublist for each available processor would be ideal, but this isn’t exactly the case. The number of processors (or, more precisely, the number of logical cores) isn’t the most important factor. There’s a more crucial question: will all sublist computations take the same amount of time? Probably not, but this depends on the type of computation. If you were to divide the list into four sublists because you decided to dedicate four threads to parallel processing, some threads might finish very quickly, while others might have to make a much longer computation. This would ruin the benefit of parallelization, because it might result in most of the computing task being handled by a single thread.

In this section, you’ll learn how to build a minimal but fully functional actor framework. While building this framework, you’ll learn how an actor framework allows for safe sharing of mutable state, easy and secure parallelization and reserialization, and modular architecture of applications. At the end of this chapter, you’ll see some general things you can do with actor frameworks.