# Alternative to computation in a loop for distances for fast performance

**URL:** https://discourse.julialang.org/t/alternative-to-computation-in-a-loop-for-distances-for-fast-performance/72642
**Category:** Performance
**Created:** [December 6, 2021, 10:52am UTC](https://discourse.julialang.org/t/alternative-to-computation-in-a-loop-for-distances-for-fast-performance/72642 "2021-12-06T10:52:49Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![jlapeyre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlapeyre/32/4514_2.png) [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)
#### Post date: [December 6, 2021, 1:20pm UTC](https://discourse.julialang.org/t/alternative-to-computation-in-a-loop-for-distances-for-fast-performance/72642/3 "2021-12-06T13:20:50Z")

</div>

> [@PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530):
>
> This is a short post on how to use backticks (` and ```) to quote code, so it is easy to read. This post can be linked to new users who are confused by this feature. Why By quoting your code, you get a monospaced font (which preserves indentation) and syntax highlighting. This makes it easier to read your code and help you. Displayed code looks like this: function displayed\_code(x::Int, y::Int) if x \< y println("x is smaller") else println("or not") end end Inline…

---

_[View the full topic](https://discourse.julialang.org/t/alternative-to-computation-in-a-loop-for-distances-for-fast-performance/72642)._
