Fast Julia: type stability and honest benchmarking

9 steps · about 4 h 40 min · Intermediate

  1. WhyJulia (article, UCI Data Science Initiative, 20 min)

    It explains why type stability plus multiple dispatch is what makes Julia fast, before you touch any tools.

  2. Multiple Dispatch vs. If-Statements in Julia (video, YouTube, 15 min)

    Dispatch is the mechanism that specialises code on types, so you need it before you can reason about stability.

  3. The Importance of Type-Stability (article, QuantumToolbox.jl docs, 20 min)

    Short worked examples show unstable code, the @code_warntype output and the benchmark gap between the two.

  4. Performance Tips · The Julia Language (doc, Julia official manual, 1 h)

    The official rules cover type-stable functions, abstract fields, and avoiding globals.

  5. How to optimise Julia code: A practical guide (article, viralinstruction, 40 min)

    A practical workflow for optimising: check inference, then benchmark, then allocations.

  6. Optimizing Julia Code (article, Modern Financial Modeling, 30 min)

    It shows @btime, type stability and function barriers applied to realistic numeric code.

  7. Optimizing your code (article, Modern Julia Workflows, 30 min)

    It introduces JET.jl, Cthulhu.jl and allocation reduction for catching deeper instabilities.

  8. LocalScopeBenchmarks.jl (repo, rdeits on GitHub, 15 min)

    It shows how global variables skew BenchmarkTools results, and why you interpolate with $.

  9. The Unreasonable Effectiveness of Multiple Dispatch (video, Stefan Karpinski, JuliaCon 2019, 50 min)

    It is Julia's co-creator explaining the design that makes generic, fast code possible, which ties the earlier steps together.