# Calling convension, should Julia "preserve\_none"?

**URL:** <https://discourse.julialang.org/t/calling-convension-should-julia-preserve-none/128898>\
**Category:** Internals & Design\
**Created:** [May 10, 2025, 10:56pm UTC](https://discourse.julialang.org/t/calling-convension-should-julia-preserve-none/128898 "2025-05-10T22:56:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [May 10, 2025, 10:56pm UTC](https://discourse.julialang.org/t/calling-convension-should-julia-preserve-none/128898/1 "2025-05-10T22:56:14Z")

</div>

[https://clang.llvm.org/docs/AttributeReference.html#preserve-none](https://clang.llvm.org/docs/AttributeReference.html#preserve-none)

It seems to be low-hanging fruit to faster performance. What does Julia do currently?

It seems to require C23 and “clang::preserve\_none”, and new opt-in Python interpreter (up to 30% faster) uses it, and requires Clang19 for now, later GCC will be allowed. I’m confused since C++11 seems to work too. Is the reason Julia can be compiled with C++ and/or C compiler, but Python only with C?

> **[What’s new in Python 3.14](https://docs.python.org/3.14/whatsnew/3.14.html#whatsnew314-tail-call)**
>
> Editor, Hugo van Kemenade,. This article explains the new features in Python 3.14, compared to 3.13. For full details, see the changelog. Summary – release highlights: Python 3.14 beta is the pre-r...

> **[3. Configure Python](https://docs.python.org/3.14/using/configure.html#cmdoption-with-tail-call-interp)**
>
> Build Requirements: Features and minimum versions required to build CPython: A C11 compiler. Optional C11 features are not required., On Windows, Microsoft Visual Studio 2017 or later is required.,...

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [May 10, 2025, 11:55pm UTC](https://discourse.julialang.org/t/calling-convension-should-julia-preserve-none/128898/2 "2025-05-10T23:55:16Z")

</div>

> [@Palli](#):
>
> Is the reason Julia can be compiled with C++ and/or C compiler, but Python only with C?

[CPython](https://github.com/python/cpython/) is written in C.

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [May 11, 2025, 12:28am UTC](https://discourse.julialang.org/t/calling-convension-should-julia-preserve-none/128898/3 "2025-05-11T00:28:23Z")

</div>

Right, I meant, there’s a common subset of C and C++, that it could be restricted to and then C++ compiler would work. Apparently that’s not the case for Python, but I think it does for Julia, since I see some files that can be compiled either way.

Anyway my point is should we use “preserve\_none”; and can we do it already with a C++11 compiler, or would we need a C23 compiler (and might consider such too new)?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [May 11, 2025, 1:32am UTC](https://discourse.julialang.org/t/calling-convension-should-julia-preserve-none/128898/4 "2025-05-11T01:32:27Z")

</div>

Julia already uses optimized calling conventions when calling between Julia functions. The only places this would be potentially useful would be calls into the runtime (which are pretty rare), and calls into JLLs (which would require rebuilding the JLLs, and apparently doesn’t provide a stable ABI)
