Optimizing common F# language constructs

When we are optimizing F# language constructs, the best way to start optimizing is to identify the most commonly used F# language constructs. This is quite subtle, but important, because commonly used F# language constructs are easier to understand and learn first rather than the rarely used or more advanced ones. However, we shall focus on the constructs that often have subtle performance impacts and recommended correctness to enforce predictable behaviors.

Predictable behaviors in the context of a running code means having predictable results on the entire flow of code, including when dealing with branches, switching execution contexts such as async and parallelisms, and having awareness on exceptions. ...

Get F# High Performance 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.