How to Make Programs Run Efficiently on a Multicore CPU

To run efficiently, we have to do the following:

  • Use lots of processes

  • Avoid side effects

  • Avoid sequential bottlenecks

  • Write “small messages, big computations” code

If we do all of these, our Erlang program should run efficiently on a multicore CPU.

Get Programming Erlang, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.