Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 3, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

xal-0 and others added 5 commits December 2, 2025 15:26
Red Hat-based distros don't include the static version of libstdc++ in
their g++ packages, so document this dependency, as well as the
`USE_RT_STATIC_LIBSTDCXX=0` workaround if it isn't available. I also
looked for missing dependencies by compiling Julia in the base
`fedora:42` and `debian:12` images:

```dockerfile
FROM debian:12 AS build

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential libatomic1 python3 gfortran perl wget m4 cmake pkg-config \
    curl git ca-certificates

WORKDIR /build
RUN git clone --depth=1 https://github.com/JuliaLang/julia.git

RUN cd julia && make -j binary-dist VERBOSE=1
```

```dockerfile
FROM fedora:42 AS build

RUN dnf install -y --nodocs --setopt=install_weak_deps=False \
    gcc gcc-c++ gcc-gfortran python3 perl wget m4 cmake pkgconfig curl git \
    which diffutils libatomic libstdc++-static

WORKDIR /build
RUN git clone --depth=1 https://github.com/JuliaLang/julia.git

RUN cd julia && make -j binary-dist VERBOSE=1
```

Reported by
#60248 (comment).
This seems to be an issue at least as far back as 1.10:
```julia
$ rm -rf ~/.julia/compiled/*/SuiteSparse/
$ julia +1.10 -q
julia> using SuiteSparse
[ Info: Precompiling SuiteSparse [4607b0f0-06f3-5cda-b6b1-a6196a1729e9]
```
To get things going with #56521
I've made a minimal implementation that mirrors one from numpy
(https://github.com/numpy/numpy/blob/7c0e2e4224c6feb04a2ac4aa851f49a2c2f6189f/numpy/_core/src/multiarray/alloc.c#L113).

What this does: changes `jl_gc_managed_malloc(size_t sz)` to check
whether requested allocation is big enough to benefit from huge pages.
And if so, we ensure the allocation is page aligned and then appropriate
`madvise` is called on the memory pointer.

For a simple "fill memory" test I see around 2x timing improvement.
```julia
function f(N)
    mem =  Memory{Int}(undef, N)
    mem .= 0
    mem[end]
end

f(1)
@time f(1_000_000)
```
```
0.001464 seconds (2 allocations: 7.633 MiB) # this branch
0.003431 seconds (2 allocations: 7.633 MiB) # master
```

I would appreciate help with this PR as I have no experience writing C
code and little knowledge of julia internals. In particular I think it
would make sense to have a startup option controlling minimal eligible
allocation size which should default to system's hugepage size - for
this initial implementation the same constant as in numpy is hardcoded.

---------

Co-authored-by: Artem Solod <>
The `kw` form isn't produced in `SyntaxNode`/`SyntaxTree` like it is in Expr,
which simplifies the parser, but causes problems once we start start caring
about the semantics of these trees. Parsing `"f(a=1)"` will always produce an
`Expr(:call, :f, Expr(:kw, :a, 1))`, but the equivalent SyntaxNode
representation `(call f (= a 1))` makes `Expr(:call, :f, Expr(:(=), :a, 1))`
unrepresentable, even though that's valid syntax a macro could produce.

To fix this, we need to convert `=` to `kw` within certain forms before
macro expansion.
@pull pull bot locked and limited conversation to collaborators Dec 3, 2025
@pull pull bot added the ⤵️ pull label Dec 3, 2025
@pull pull bot merged commit 296cca2 into MLH-Fellowship:master Dec 3, 2025
3 of 4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants