# Internals & Design

**URL:** https://discourse.julialang.org/c/dev/5.md?page=9

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

**Page:** 10

---

## [Increase in allocations with Julia v1.11-beta](https://discourse.julialang.org/t/increase-in-allocations-with-julia-v1-11-beta/112838)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 46\
**Last updated:** [May 8, 2024, 2:54pm UTC](https://discourse.julialang.org/t/increase-in-allocations-with-julia-v1-11-beta/112838 "2024-05-08T14:54:58Z")

</div>

Is the number of allocations considered an issue? In my small tests here with my packages I’m not seeing performance regressions, but I systematically see the number of allocations increasing, even when compilation is no…

---

## ["unreachable" reached (with infinite loops) vs Julia](https://discourse.julialang.org/t/unreachable-reached-with-infinite-loops-vs-julia/113906)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 7\
**Last updated:** [May 7, 2024, 3:37pm UTC](https://discourse.julialang.org/t/unreachable-reached-with-infinite-loops-vs-julia/113906 "2024-05-07T15:37:11Z")

</div>

This “unreachable” concept is rather low-level, in LLVM, and I’ve not thought much of it, until seeming you can define it in C++ as a function? Should Julia do the same. And see here C++ vs C difference related to it and…

---

## [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…

---

## [I don't get Base.IteratorElType](https://discourse.julialang.org/t/i-dont-get-base-iteratoreltype/113604)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 6\
**Last updated:** [April 30, 2024, 7:50am UTC](https://discourse.julialang.org/t/i-dont-get-base-iteratoreltype/113604 "2024-04-30T07:50:15Z")

</div>

Motivation I’m implementing a collect-like function for a certain subtype of AbstractArray, FixedSizeArray (@giordano). The function is supposed to take an arbitrary iterator, consume it, and return a FixedSizeArray valu…

---

## [\[FR\] keep using a re-precompiled package without restarting Julia](https://discourse.julialang.org/t/fr-keep-using-a-re-precompiled-package-without-restarting-julia/113544)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [April 30, 2024, 3:29am UTC](https://discourse.julialang.org/t/fr-keep-using-a-re-precompiled-package-without-restarting-julia/113544 "2024-04-30T03:29:48Z")

</div>

Is this a viable feature request? It would be nice if we could just do using MyPackage again or something, instead of having to use a new OS process just to be able to, e.g., use the package with a changed static prefere…

---

## [Why is rust compilation faster than Julia pre-compilation?](https://discourse.julialang.org/t/why-is-rust-compilation-faster-than-julia-pre-compilation/113257)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 37\
**Last updated:** [April 26, 2024, 11:23am UTC](https://discourse.julialang.org/t/why-is-rust-compilation-faster-than-julia-pre-compilation/113257 "2024-04-26T11:23:32Z")

</div>

I’ve been learning Rust a bit for tinkering with CLI tools (if curious… GitHub - MilesCranmer/rip2: A safe and ergonomic alternative to rm). One thing I noticed is that the compilation time is super fast – even faster t…

---

## [Revisiting saturating intrinsics](https://discourse.julialang.org/t/revisiting-saturating-intrinsics/112917)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 9\
**Last updated:** [April 25, 2024, 5:15am UTC](https://discourse.julialang.org/t/revisiting-saturating-intrinsics/112917 "2024-04-25T05:15:37Z")

</div>

Hi all. Here is the origin of the discussion I want to have. I had to leave the development a few years ago due to somewhat misfortunes. I apologize for the inconvenience. Unfortunately, no progress has been made in…

---

## [Empty Array with nonzero size along some dimension, should they be disallowed?](https://discourse.julialang.org/t/empty-array-with-nonzero-size-along-some-dimension-should-they-be-disallowed/113449)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 2\
**Last updated:** [April 24, 2024, 1:57pm UTC](https://discourse.julialang.org/t/empty-array-with-nonzero-size-along-some-dimension-should-they-be-disallowed/113449 "2024-04-24T13:57:12Z")

</div>

On both LTS and nightly we have: julia\> a = Array{Int}(undef, 0, 1) 0×1 Matrix{Int64} julia\> size(a) (0, 1) julia\> length(a) 0 Is this a bug? I’d actually have expected the construction attempt to throw. Couldn’t fin…

---

## [How is copy! legal when the size of src and dst array are different?](https://discourse.julialang.org/t/how-is-copy-legal-when-the-size-of-src-and-dst-array-are-different/113151)

<div class="topic-metadata">

**Author:** [@Abhinav\_Bhatia](https://discourse.julialang.org/u/Abhinav_Bhatia)\
**Replies:** 3\
**Last updated:** [April 18, 2024, 5:06pm UTC](https://discourse.julialang.org/t/how-is-copy-legal-when-the-size-of-src-and-dst-array-are-different/113151 "2024-04-18T17:06:04Z")

</div>

How is something like this legal? x = rand(2) y = rand(3) copy!(x, y) # in-place copying should be impossible. This is somehow legal and leads to creation of a new array for x and y is then copied to x. Shouldn’t t…

---

## [Cannot declare Main.foo constant; it already has a value](https://discourse.julialang.org/t/cannot-declare-main-foo-constant-it-already-has-a-value/112453)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 4\
**Last updated:** [April 17, 2024, 2:45pm UTC](https://discourse.julialang.org/t/cannot-declare-main-foo-constant-it-already-has-a-value/112453 "2024-04-17T14:45:15Z")

</div>

I experiment with setting the value of foo, decide I’m happy with it, and I want to make it const but I can’t. Can something be done to make this less annoying? julia\> foo = \[\] Any\[\] julia\> const foo = \[\] ERROR: cannot…

---

## [An off-topic question: Why is it \`add\`/\`import\` a package, but \`using\` instead of \`use\` it?](https://discourse.julialang.org/t/an-off-topic-question-why-is-it-add-import-a-package-but-using-instead-of-use-it/112948)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 3\
**Last updated:** [April 16, 2024, 1:28am UTC](https://discourse.julialang.org/t/an-off-topic-question-why-is-it-add-import-a-package-but-using-instead-of-use-it/112948 "2024-04-16T01:28:45Z")

</div>

An off-topic question: Why is it add/import a package, but using instead of use it?

---

## [Escaping the inference length limit for tuples](https://discourse.julialang.org/t/escaping-the-inference-length-limit-for-tuples/108265)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 7\
**Last updated:** [April 12, 2024, 8:17pm UTC](https://discourse.julialang.org/t/escaping-the-inference-length-limit-for-tuples/108265 "2024-04-12T20:17:07Z")

</div>

A lot of functions limit tuple for which they specialize at 32 elements. It is easy to run into non-inferred code because of this, eg z = NamedTuple{ntuple(i -\> Symbol("a" \* string(i)), 33)}(ntuple(i -\> (1, 2.0, π, 3f0)…

---

## [Versioning reproducibility with upgradeable stdlibs?](https://discourse.julialang.org/t/versioning-reproducibility-with-upgradeable-stdlibs/112839)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 2\
**Last updated:** [April 12, 2024, 9:15am UTC](https://discourse.julialang.org/t/versioning-reproducibility-with-upgradeable-stdlibs/112839 "2024-04-12T09:15:29Z")

</div>

I guess this has been considered already, but I just realized this trend means that “I have this problem in Julia 1.x” and “I can’t reproduce in Julia 1.y” will be much less meaningful in the future…

---

## [Should we make radix sort the primary option for sorting?](https://discourse.julialang.org/t/should-we-make-radix-sort-the-primary-option-for-sorting/112708)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 2\
**Last updated:** [April 9, 2024, 6:19am UTC](https://discourse.julialang.org/t/should-we-make-radix-sort-the-primary-option-for-sorting/112708 "2024-04-09T06:19:10Z")

</div>

In a typical programming language, comparison-based sorting function is typically used due to the requirements being simpler, only requiring comparisons. In practice, however, if comparisons are possible, radix sorting …

---

## [Is it time to make LLVM optional and how?](https://discourse.julialang.org/t/is-it-time-to-make-llvm-optional-and-how/112677)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 7\
**Last updated:** [April 8, 2024, 8:28pm UTC](https://discourse.julialang.org/t/is-it-time-to-make-llvm-optional-and-how/112677 "2024-04-08T20:28:13Z")

</div>

LLVM is a very heavy dependency, and is required (for fully compiled apps), just (I meant e.g.) in case eval is used. I would like to drop LLVM requirement (for still rather fast code), and I know it’s possible, then you…

---

## [Transposes vs 1-row matrices](https://discourse.julialang.org/t/transposes-vs-1-row-matrices/112652)

<div class="topic-metadata">

**Author:** [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Replies:** 3\
**Last updated:** [April 8, 2024, 6:34am UTC](https://discourse.julialang.org/t/transposes-vs-1-row-matrices/112652 "2024-04-08T06:34:50Z")

</div>

This will return a 1-element array. You could get a scalar out by using an Adjoint vector instead via \[-1,1\]'\*\[extrema(itr)...\] (see e.g. @jiahao’s talk on the meaning of transposition). But it’s a bit silly to allo…

---

## [Associativity of promote\_type](https://discourse.julialang.org/t/associativity-of-promote-type/109958)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 6\
**Last updated:** [April 7, 2024, 3:14pm UTC](https://discourse.julialang.org/t/associativity-of-promote-type/109958 "2024-04-07T15:14:45Z")

</div>

I found this via a bug report in JuMP: Error vcat(::NonlinearExpr, ::VariableRef, ::Float64) · Issue #3671 · jump-dev/JuMP.jl · GitHub. promote\_type has an implicit assumption of associativity, i.e.: promote\_type(A, pr…

---

## [Fixing the Piping/Chaining Issue (Rev 3)](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 89\
**Last updated:** [April 5, 2024, 3:13am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836 "2024-04-05T03:13:54Z")

</div>

Third time’s (hopefully) the charm :wink: Okay so in contrast with my last two proposals (1, 2) this proposal is less preachy, and more “hey check out this crazy cool thing I did and please offer feedback.” Hopefully it…

---

## [Improving doc for display/print/show/repr/](https://discourse.julialang.org/t/improving-doc-for-display-print-show-repr/69124)

<div class="topic-metadata">

**Author:** [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Replies:** 3\
**Last updated:** [April 2, 2024, 9:01pm UTC](https://discourse.julialang.org/t/improving-doc-for-display-print-show-repr/69124 "2024-04-02T21:01:48Z")

</div>

Continuing on what was started in (wrong forum?) Julep: extended proposal for fixing show, print, & friends · Issue #14052 · JuliaLang/julia · GitHub Questions Why would we use repr() over string()? Clearly, the call …

---

## [Why is push! still so slow?](https://discourse.julialang.org/t/why-is-push-still-so-slow/112170)

<div class="topic-metadata">

**Author:** [@PatrickHaecker](https://discourse.julialang.org/u/PatrickHaecker)\
**Replies:** 39\
**Last updated:** [March 29, 2024, 4:10pm UTC](https://discourse.julialang.org/t/why-is-push-still-so-slow/112170 "2024-03-29T16:10:08Z")

</div>

push! will always have some performance burden if the reserved memory is not large enough. This is to be expected. Here, I am focusing on the case where the new values will fit into the already reserved memory. With Jul…

---

## [Does Julia libraries exists?](https://discourse.julialang.org/t/does-julia-libraries-exists/112278)

<div class="topic-metadata">

**Author:** [@KZiemian](https://discourse.julialang.org/u/KZiemian)\
**Replies:** 2\
**Last updated:** [March 29, 2024, 11:26am UTC](https://discourse.julialang.org/t/does-julia-libraries-exists/112278 "2024-03-29T11:26:23Z")

</div>

It may be stupid noob question. I watched Low Level Learning episode Why rust libraries may never exist, which say something like that. Normal C library is external binary that we can linked in different ways, to use wit…

---

## [StringIndex idea (Julia 2.0)](https://discourse.julialang.org/t/stringindex-idea-julia-2-0/107185)

<div class="topic-metadata">

**Author:** [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Replies:** 71\
**Last updated:** [March 27, 2024, 10:11pm UTC](https://discourse.julialang.org/t/stringindex-idea-julia-2-0/107185 "2024-03-27T22:11:11Z")

</div>

Continuing the discussion from String indices : byte indexing feels wrong… The other day I had a somewhat clever idea for how to preserve the O(1) indexing benefits that Julia currently has, while making string indexing …

---

## [Term for minor revisions breaking dependents due to non-API usage?](https://discourse.julialang.org/t/term-for-minor-revisions-breaking-dependents-due-to-non-api-usage/112006)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 4\
**Last updated:** [March 24, 2024, 12:30am UTC](https://discourse.julialang.org/t/term-for-minor-revisions-breaking-dependents-due-to-non-api-usage/112006 "2024-03-24T00:30:33Z")

</div>

When a patch or minor revision occurs for a v1+ dependency, we expect our project to keep working. If every package only used public API from dependencies, that is easily true. However, some packages intentionally access…

---

## [Nice macro errors with JuliaSyntax](https://discourse.julialang.org/t/nice-macro-errors-with-juliasyntax/112017)

<div class="topic-metadata">

**Author:** [@dylanxyz](https://discourse.julialang.org/u/dylanxyz)\
**Replies:** 2\
**Last updated:** [March 23, 2024, 9:32pm UTC](https://discourse.julialang.org/t/nice-macro-errors-with-juliasyntax/112017 "2024-03-23T21:32:08Z")

</div>

Now with the introduce of JuliaSyntax in newer versions of julia, we get much more friendly syntax error messages. For example: julia\> foo () ERROR: ParseError: # Error @ REPL\[28\]:1:4 foo () # ╙ ── whitespace is not al…

---

## [Are there any plans for Julia to adopt an effects system?](https://discourse.julialang.org/t/are-there-any-plans-for-julia-to-adopt-an-effects-system/110729)

<div class="topic-metadata">

**Author:** [@xiaoxi](https://discourse.julialang.org/u/xiaoxi)\
**Replies:** 7\
**Last updated:** [March 22, 2024, 6:54pm UTC](https://discourse.julialang.org/t/are-there-any-plans-for-julia-to-adopt-an-effects-system/110729 "2024-03-22T18:54:21Z")

</div>

It seems that industry programming languages such as Rust or Scala are studying the implementation of an effects system. Is there any Julep about it? For reference: Rust: Extending Rust's Effect System Scala: CanThr…

---

## [Feature request: unsafe\_free!](https://discourse.julialang.org/t/feature-request-unsafe-free/111767)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 25\
**Last updated:** [March 21, 2024, 3:46pm UTC](https://discourse.julialang.org/t/feature-request-unsafe-free/111767 "2024-03-21T15:46:55Z")

</div>

In view of the thread on feature requests, let’s put that here first before github. I really like how CUDA.jl mixes memory management strategies: Memory is garbage collected, as in normal julia. But, optionally and on u…

---

## [IRCE appreciation and gripes (inductive range check elimination)](https://discourse.julialang.org/t/irce-appreciation-and-gripes-inductive-range-check-elimination/111822)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 3\
**Last updated:** [March 19, 2024, 4:54pm UTC](https://discourse.julialang.org/t/irce-appreciation-and-gripes-inductive-range-check-elimination/111822 "2024-03-19T16:54:47Z")

</div>

IRCE is an LLVM pass that aims to loop unswitch range checks. As such, its goal is to reduce the performance impact of bounds checks – especially missing @inbounds should no longer prevent vectorization. To give a simpl…

---

## [Borrow checker with GC fallback?](https://discourse.julialang.org/t/borrow-checker-with-gc-fallback/111798)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 4\
**Last updated:** [March 19, 2024, 4:12pm UTC](https://discourse.julialang.org/t/borrow-checker-with-gc-fallback/111798 "2024-03-19T16:12:39Z")

</div>

GC incurs some overhead. It’d be nice if we don’t have to GC everything. In some cases, we can detect exactly when the memory needs to be freed at compile time. If so, would it be a good idea? Julia is a language that wa…

---

## [Where should Julia feature requests go?](https://discourse.julialang.org/t/where-should-julia-feature-requests-go/102835)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 41\
**Last updated:** [March 18, 2024, 10:34am UTC](https://discourse.julialang.org/t/where-should-julia-feature-requests-go/102835 "2024-03-18T10:34:32Z")

</div>

The PR by @Sukera on a new issue template triggered a wider discussion about what GitHub issues are for, and how they should be used in the Julia language repo. On the aspect of feature requests, @viralbshah said the fol…

---

## [Manual type inference of hand-written IRCode](https://discourse.julialang.org/t/manual-type-inference-of-hand-written-ircode/106356)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 10\
**Last updated:** [March 15, 2024, 8:02am UTC](https://discourse.julialang.org/t/manual-type-inference-of-hand-written-ircode/106356 "2024-03-15T08:02:19Z")

</div>

Hello, i am trying to write something like Petite Zygote by manipulating Core.Compiler.IRCode to get sense, how it works. I am considering that as a part of survey, if I should show it to students, where the compiler in…

[Previous page](https://discourse.julialang.org/c/dev/5.md?page=8)

[Next page](https://discourse.julialang.org/c/dev/5.md?page=10)
