Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
F# High Performance

You're reading from   F# High Performance Increase your F# programming productivity and focus on performance optimization with best practices, expert techniques, and more

Arrow left icon
Product type Paperback
Published in Jan 2017
Publisher Packt
ISBN-13 9781786468079
Length 338 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Eriawan Kusumawardhono Eriawan Kusumawardhono
Author Profile Icon Eriawan Kusumawardhono
Eriawan Kusumawardhono
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Performing Common Optimizations in F# FREE CHAPTER 2. Performance Measurement 3. Optimizing Data Structures 4. Introduction to Concurrency in F# 5. Advanced Concurrency Support in F# 6. Optimizing Type Provider 7. Language Features and Constructs Optimization 8. Optimizing Computation Expressions

Ways to measure performance quantitatively

There are many ways to measure performances of any running .NET code on top of CLR, including F#. So, any tool used to measure F# code is essentially usable for other programming languages on .NET CLR as well.

Again, the easiest way to objectively measure performance is by using quantitative measurements. The following are some common ways of measuring running codes:

  • Using .NET timers
  • Using native Win32 timer
  • Using Visual Studio Diagnostic
  • Running functions inside unit tests

The previous numbers are ordered from the subtlest and difficult to the quickest way of having statistical timing as performance measurements.

Using .NET timers

There are many timer classes in the .NET Framework but not all of them have a general purpose from the perspective of implementation details and in the context of execution environments.

In the context of execution environments, .NET timers are divided as follows:

  • UI timers (timers that are run on an UI thread)
  • Non-UI timer (timers...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime