# \#corebox

**URL:** https://discourse.julialang.org/tag/corebox/1205.md

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

---

## [RFC: Some Ideas to Tackle #15276 - performance of captured variables in closures](https://discourse.julialang.org/t/rfc-some-ideas-to-tackle-15276-performance-of-captured-variables-in-closures/95260)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 65\
**Last updated:** [February 16, 2024, 8:56pm UTC](https://discourse.julialang.org/t/rfc-some-ideas-to-tackle-15276-performance-of-captured-variables-in-closures/95260 "2024-02-16T20:56:29Z")

</div>

Naïvely written Julia should be performant. It shouldn’t take memorizing a 35-page manual to reliably beat Matlab. Unless more performance footguns are removed, it’s impossible for a package ecosystem to be performant. F…

---

## [Call FastClosures.jl \`@closure\` in Array Comprehensions?](https://discourse.julialang.org/t/call-fastclosures-jl-closure-in-array-comprehensions/93622)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 2\
**Last updated:** [February 3, 2023, 1:44am UTC](https://discourse.julialang.org/t/call-fastclosures-jl-closure-in-array-comprehensions/93622 "2023-02-03T01:44:42Z")

</div>

Like with any closure, array comprehensions present a performance challenge if they capture a variable whose identifier is reassigned: julia\> using BenchmarkTools julia\> const a=\[1:1000;\]; julia\> @btime let b=a; \[b\[x\]…

---

## [\`Core.Box\` around captured variable](https://discourse.julialang.org/t/core-box-around-captured-variable/91299)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 2\
**Last updated:** [December 6, 2022, 1:24pm UTC](https://discourse.julialang.org/t/core-box-around-captured-variable/91299 "2022-12-06T13:24:33Z")

</div>

If I define a variable inside an outer function that generates a closure, this variable gets boxed inside the closer. Does this affect performance and if yes, how do I best avoid it? Here is a simple MWE: julia\> functi…

---

## [Should I believe this Core.Box()?](https://discourse.julialang.org/t/should-i-believe-this-core-box/90263)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 2\
**Last updated:** [November 14, 2022, 10:55pm UTC](https://discourse.julialang.org/t/should-i-believe-this-core-box/90263 "2022-11-14T22:55:05Z")

</div>

In a debug session. Note that D3\_ becomes instantly a Core.Box() but the precedent line, which is virtually equal, gets assigned as expected.
