# Rules when box/unbox applies

**URL:** https://discourse.julialang.org/t/rules-when-box-unbox-applies/50463
**Category:** New to Julia
**Created:** [November 19, 2020, 9:10pm UTC](https://discourse.julialang.org/t/rules-when-box-unbox-applies/50463 "2020-11-19T21:10:23Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![JuergenD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juergend/32/18970_2.png) [@JuergenD](https://discourse.julialang.org/u/JuergenD)
#### Post date: [November 20, 2020, 8:31am UTC](https://discourse.julialang.org/t/rules-when-box-unbox-applies/50463/3 "2020-11-20T08:31:55Z")

</div>

> Does your loop in `iter_loop` literally do nothing?

It does something useful in our real code, but best practices described in [PSA Make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757) suggest to strip examples down as much as possible. And the iter\_loop body is not relevant for my question.

> What it looks to me is that the first two versions of iter\_loop are calling the signature  
> ` iter_loop(::FWFile, ::AsciiField) `  
> and the third version is calling  
> ` iter_loop(::FWFile, ::String) `

Well, yes and no. The 3rd option is calling `iter_loop(::FWFile, ::String)` which after resolving the String calls `iter_loop(::FWFile, ::AbstractField)`. And like option 2, it should be able to specialise to `iter_loop(::FWFile, ::AsciiField)`. Option 2 and 3 are only marginally different.

> Also you should check out `@btime` from `BenchmarkTools`

Yes I did. How exactly does it help to answer my questions?

---

_[View the full topic](https://discourse.julialang.org/t/rules-when-box-unbox-applies/50463)._
