# Combining @pure and @inline

**URL:** <https://discourse.julialang.org/t/combining-pure-and-inline/19331>\
**Category:** Performance\
**Tags:** question\
**Created:** [January 6, 2019, 7:40pm UTC](https://discourse.julialang.org/t/combining-pure-and-inline/19331 "2019-01-06T19:40:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [January 6, 2019, 7:40pm UTC](https://discourse.julialang.org/t/combining-pure-and-inline/19331/1 "2019-01-06T19:40:34Z")

</div>

If I use `@pure`, would `@inline` be superfluous?

If not, in which order should they be used? `@pure @inline` or `@inline @pure`

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [January 6, 2019, 9:16pm UTC](https://discourse.julialang.org/t/combining-pure-and-inline/19331/2 "2019-01-06T21:16:24Z")

</div>

My understanding is that `@pure` says your function has no side-effects (e.g. printing or writing a file) and is completely deterministic based on the input parameters. But `@inline` says that the code of this function is to be inserted into the machine generated code instead of “calling” it by its definition whose machine codes are stored elsewhere. The two are orthogonal concepts so I would guess that the two shouldn’t matter whichever order you put them; at least I can’t think of a reason for that to be the case.

Best way is to test it out using some small examples.
