# Question about constant propagation and inference

**URL:** <https://discourse.julialang.org/t/question-about-constant-propagation-and-inference/24889>\
**Category:** General Usage\
**Created:** [June 3, 2019, 1:00pm UTC](https://discourse.julialang.org/t/question-about-constant-propagation-and-inference/24889 "2019-06-03T13:00:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [June 3, 2019, 1:10pm UTC](https://discourse.julialang.org/t/question-about-constant-propagation-and-inference/24889/4 "2019-06-03T13:10:42Z")

</div>

See eg

> [@Inlining behavior: constant prop. fails, I need help in understanding "why"](https://discourse.julialang.org/t/inlining-behavior-constant-prop-fails-i-need-help-in-understanding-why/17134/4):
>
> This is how I usually benchmark constant propagation: julia\> function f(x) D = 1 reconstruct(x, D) end f (generic function with 1 method) julia\> @btime f($x) 871.847 ns (2 allocations: 112 bytes) 50.48725909006644

---

_[View the full topic](https://discourse.julialang.org/t/question-about-constant-propagation-and-inference/24889)._
