# \#box

**URL:** https://discourse.julialang.org/tag/box/814.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Improper function nesting causes boxing/runtime dispatch?](https://discourse.julialang.org/t/improper-function-nesting-causes-boxing-runtime-dispatch/114307)

<div class="topic-metadata">

**Author:** [@bremez](https://discourse.julialang.org/u/bremez)\
**Replies:** 3\
**Last updated:** [May 17, 2024, 7:00am UTC](https://discourse.julialang.org/t/improper-function-nesting-causes-boxing-runtime-dispatch/114307 "2024-05-17T07:00:01Z")

</div>

Note the code example below: struct Radix{N} Radix(n::Integer) = new{n}(); end # Nesting: testfunc! -\> \_add, \_addpositions function testfunc!(array, num, radix) \_add(a, b, ::Radix{2}) = a ⊻ b \_add(a, …

---

## [Elimination of (unnecessary) runtime dispatch allocations](https://discourse.julialang.org/t/elimination-of-unnecessary-runtime-dispatch-allocations/113475)

<div class="topic-metadata">

**Author:** [@nielsls](https://discourse.julialang.org/u/nielsls)\
**Replies:** 13\
**Last updated:** [May 5, 2024, 12:00pm UTC](https://discourse.julialang.org/t/elimination-of-unnecessary-runtime-dispatch-allocations/113475 "2024-05-05T12:00:26Z")

</div>

Avoiding runtime dispatch is perhaps the #1 optimization advice in Julia forums. As I understand it, the reason is that when the Julia compiler does a runtime dispatch it does not at compile-time neccesarily know the re…

---

## [Advanced iteration interface in Julia](https://discourse.julialang.org/t/advanced-iteration-interface-in-julia/68618)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 5\
**Last updated:** [September 23, 2021, 9:39am UTC](https://discourse.julialang.org/t/advanced-iteration-interface-in-julia/68618 "2021-09-23T09:39:15Z")

</div>

I’m working on a function to simplify iterating over binary trees. Ideally, this function should have the following signature: walk\_down( tree, starting\_vertex; two\_children, # Function vertex -\> Union{Val(:le…
