# Basic Performance Analysis Package

**URL:** <https://discourse.julialang.org/t/basic-performance-analysis-package/32032>\
**Category:** General Usage\
**Created:** [December 8, 2019, 11:35pm UTC](https://discourse.julialang.org/t/basic-performance-analysis-package/32032 "2019-12-08T23:35:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qiyamah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qiyamah/32/2660_2.png) [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)\
**Post date:** [December 8, 2019, 11:35pm UTC](https://discourse.julialang.org/t/basic-performance-analysis-package/32032/1 "2019-12-08T23:35:25Z")

</div>

I was wondering if there is a package to test my code to point out the common pitfalls that slows down my code? Like type instability and boxing and unboxing and etc???

Thanks

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [December 9, 2019, 12:04am UTC](https://discourse.julialang.org/t/basic-performance-analysis-package/32032/2 "2019-12-09T00:04:25Z")

</div>

These lecture notes mention a few packages and how to use them.

[https://mitmath.github.io/18337/lecture18/code\_profiling](https://mitmath.github.io/18337/lecture18/code_profiling)

Some only get mentions, but that should be enough to start digging around.

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [December 9, 2019, 12:07am UTC](https://discourse.julialang.org/t/basic-performance-analysis-package/32032/3 "2019-12-09T00:07:38Z")

</div>

We go through similar stuff here  
[https://github.com/baggepinnen/juliacourse/blob/master/lecture3/performance.pdf](https://github.com/baggepinnen/juliacourse/blob/master/lecture3/performance.pdf)

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [December 9, 2019, 12:57am UTC](https://discourse.julialang.org/t/basic-performance-analysis-package/32032/4 "2019-12-09T00:57:35Z")

</div>

I have made my comment a community wiki. Please feel free to edit this comment to add more packages to the list.

First of all, I always recommend reading the [Performance Tips section](https://docs.julialang.org/en/v1/manual/performance-tips/) of the manual.

Now for the list of packages:

1. [Traceur.jl](https://github.com/JunoLab/Traceur.jl): “runs your code and tells you about any obvious performance traps.” **I think this is the package that best answers the original question.**

2. [Cthulhu.jl](https://github.com/JuliaDebug/Cthulhu.jl): “can help you debug type inference issues by recursively showing the `code_typed` output until you find the exact point where inference gave up, messed up, or did something unexpected.”

3. [BenchmarkTools.jl](https://github.com/JuliaCI/BenchmarkTools.jl): “makes performance tracking of Julia code easy by supplying a framework for writing and running groups of benchmarks as well as comparing benchmark results.”

4. [The `Profile` standard library](https://docs.julialang.org/en/v1/manual/profile/): Julia’s built-in sampling (statistical) profiler. “When used, it takes measurements on running code, and produces output that helps you understand how much time is spent on individual line(s). The most common usage is to identify “bottlenecks” as targets for optimization.”

5. [TimerOutputs.jl](https://github.com/KristofferC/TimerOutputs.jl): “generate formatted output from timings made in different sections of a program”
