# Turing.jl for Causal Inference model

**URL:** <https://discourse.julialang.org/t/turing-jl-for-causal-inference-model/75650>\
**Category:** Probabilistic Programming\
**Tags:** performance, turing\
**Created:** [February 2, 2022, 12:51pm UTC](https://discourse.julialang.org/t/turing-jl-for-causal-inference-model/75650 "2022-02-02T12:51:25Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![danielw2904](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielw2904/32/10890_2.png) [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Post date:** [February 4, 2022, 10:29am UTC](https://discourse.julialang.org/t/turing-jl-for-causal-inference-model/75650/19 "2022-02-04T10:29:28Z")

</div>

Here is my benchmark for two runs of each:

```julia
Turing.setadbackend(:forwarddiff)

Iterations = 1001:1:2000
Number of chains = 4
Samples per chain = 1000
Wall duration = 102.14 seconds
Compute duration = 361.99 seconds

Iterations = 1001:1:2000
Number of chains = 4
Samples per chain = 1000
Wall duration = 95.9 seconds
Compute duration = 333.32 seconds

```

```julia
Turing.setadbackend(:tracker)

Iterations = 1001:1:2000
Number of chains = 4
Samples per chain = 1000
Wall duration = 99.84 seconds
Compute duration = 331.42 seconds

Iterations = 1001:1:2000
Number of chains = 4
Samples per chain = 1000
Wall duration = 86.06 seconds
Compute duration = 298.54 seconds

```

```julia
Turing.setadbackend(:zygote)
# gave up after a couple of minutes; will let it run over the weekend

```

```julia
Turing.setadbackend(:reversediff)
Turing.setrdcache(true)
Iterations = 1001:1:2000
Number of chains = 4
Samples per chain = 1000
Wall duration = 26.13 seconds
Compute duration = 101.67 seconds

Iterations = 1001:1:2000
Number of chains = 4
Samples per chain = 1000
Wall duration = 5.85 seconds
Compute duration = 20.05 seconds

```

---

_[View the full topic](https://discourse.julialang.org/t/turing-jl-for-causal-inference-model/75650)._
