~/talk

F# for Performance-Critical Code

Talkat JetBrains .NET Days Online 2022 · 2022-10-25..10-26· [dotnet]
links:none on file
slides:none on file

F# codebase for a discrete‑rate simulation engine hits a concrete goal: rerun a million time steps inside one second — 1 microsecond per step — by replacing naive linear programming with a custom algorithm plus aggressive, measured optimizations. Using BenchmarkDotNet and dotTrace, the implementation moves from maps and hashsets to arrays, bitsets, stack allocation and a compressed sparse row layout, adds branchless IL where needed, and delivers roughly a 100x speedup over an industry engine.

AI-written summary · about

  1. 0:00F# for performance-critical code
  2. 1:05Why F# excels in performance
  3. 8:11Microsecond budget for performance
  4. 9:57Replacing linear programming
  5. 13:27Measuring performance with Benchmark.NET
  6. 14:30Mutation in F# for speed
  7. 16:13Right data structures for performance
  8. 17:59Units of measure for fast equality
  9. 21:12Minimizing data representation
  10. 22:58Optimizing memory layout
  11. 26:12Replacing hash sets with bit arrays
  12. 29:23Stack allocation to reduce heap
  13. 32:14Compressed sparse row for graphs
  14. 35:05Refining algorithms beyond theory
  15. 38:59Simplifying data structures
  16. 40:26Branchless programming with inline IL
  17. 44:26Real-world simulation impact
  18. 45:29Key takeaways for high-performance F#
  19. 58:03Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.