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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.