For rapid prototyping, the fsi sync directive provides good readings:
#if INTERACTIVE #time "on" #endif
It prints something like:
Real: 00:00:00.199, CPU: 00:00:00.120, GC gen0: 0, gen1: 0, gen2: 0
In addition to runtime, other statistics show the amount of garbage collected at the three levels of the GC generation, which is useful for understanding the memory usage of your programs.
For serious benchmarking, you should use the Visual Studio Profiler , which provides function call counting, time and memory allocation, etc. or even using third-party memory profiles. You can find some tips on using these profilers in my answer in the Good F # Performance Profiling Tool .
pad
source share