# Comparing Python, Julia, and C++

**URL:** <https://discourse.julialang.org/t/comparing-python-julia-and-c/17019>\
**Category:** Performance\
**Tags:** broadcast, python\
**Created:** [October 31, 2018, 6:03pm UTC](https://discourse.julialang.org/t/comparing-python-julia-and-c/17019 "2018-10-31T18:03:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [October 31, 2018, 6:15pm UTC](https://discourse.julialang.org/t/comparing-python-julia-and-c/17019/2 "2018-10-31T18:15:24Z")

</div>

Not sure about the original question, but for the Julia code you’re not actually initializing the input arrays:

> <https://github.com/ziotom78/python-julia-c-/blob/d6a5a1faa3350498b321c9719293d25752112a1d/julia-speed.jl#L13>

This may result in subnormal numbers in your test inputs, which can adversely affect performance. See e.g. [50x speed difference in gemv for different values in vector - #3 by StefanKarpinski](https://discourse.julialang.org/t/50x-speed-difference-in-gemv-for-different-values-in-vector/2755/3).

---

_[View the full topic](https://discourse.julialang.org/t/comparing-python-julia-and-c/17019)._
