# Functions vs let

**URL:** <https://discourse.julialang.org/t/functions-vs-let/73573>\
**Category:** General Usage\
**Created:** [December 24, 2021, 4:23am UTC](https://discourse.julialang.org/t/functions-vs-let/73573 "2021-12-24T04:23:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [December 24, 2021, 4:26am UTC](https://discourse.julialang.org/t/functions-vs-let/73573/2 "2021-12-24T04:26:59Z")

</div>

> [@Are let blocks as fast as functions?](https://discourse.julialang.org/t/are-let-blocks-as-fast-as-functions/42115):
>
> Based on reading this discussion and having to write a large script (I prefer script files), I find that using functions for “for loops” is a pain in my application. Since the matrices I’m dealing with are very large (~ 9000 x 10000), I have declared them as const and used mutation/vectorization to change its values inside for loops (I am NOT iterating over rows/cols). I was wondering if this approach is good enough or should I enclose the script in a “let block” to simulate local scoping behavi…

---

_[View the full topic](https://discourse.julialang.org/t/functions-vs-let/73573)._
