From 2e6d5a54f4182cc0938dfefe5164f97d854d7153 Mon Sep 17 00:00:00 2001 From: nhz2 Date: Sun, 7 Dec 2025 16:21:44 -0500 Subject: [PATCH 1/3] Bump to version 1.0 --- .github/workflows/CI.yml | 4 ++-- Project.toml | 4 ++-- README.md | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9aef1a4..b930c11 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: version: - - '1.7' + - '1.6' - '1.10' - '1.12' - 'pre' @@ -30,7 +30,7 @@ jobs: - 'x86' exclude: - os: macos-latest - version: '1.7' + version: '1.6' - os: macos-latest arch: 'x86' steps: diff --git a/Project.toml b/Project.toml index a1b05dd..a0da371 100644 --- a/Project.toml +++ b/Project.toml @@ -1,10 +1,10 @@ name = "MutatePlainDataArray" uuid = "3b0f367b-da20-4531-811a-c13cc92422b5" authors = ["Haoran Ni and contributors"] -version = "0.4.0" +version = "1.0.0" [compat] -julia = "1.7" +julia = "1.6" [workspace] projects = ["test"] diff --git a/README.md b/README.md index 0941def..0406418 100644 --- a/README.md +++ b/README.md @@ -47,3 +47,9 @@ julia> b The mutation provided by this package is - **Efficient**. Under the hood, the mutation is achieved by pointer load/store, where the address offset is known at type inference time. - **Safe**. Compile-time type check is enforced. Reference to the original vector is obtained to prevent garbage collection. Bounds check is performed unless `@inbounds` is used. This package is inspired by and acts as a safer counterpart to [UnsafePointers.jl](https://github.com/cjdoris/UnsafePointers.jl). + +## See also + +[StructArrays.jl](https://github.com/JuliaArrays/StructArrays.jl) +[FieldViews.jl](https://github.com/MasonProtter/FieldViews.jl) +[BangBang.jl](https://github.com/JuliaFolds/BangBang.jl) From be16eb5b029eaf8f5c99276b3fb26de8e6151000 Mon Sep 17 00:00:00 2001 From: nhz2 Date: Sun, 7 Dec 2025 16:27:34 -0500 Subject: [PATCH 2/3] Fix tests for Julia 1.6 --- test/runtests.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 29b01ac..91c3fa4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -47,11 +47,11 @@ end @testset "MutatePlainDataArray.jl" begin @test isbitstype(TAB) - @test !isbitstype(TAI) && !ismutabletype(TAI) - @test ismutabletype(TAM) + @test !isbitstype(TAI) + @test !isbitstype(TAM) @test isbitstype(TBB) - @test !isbitstype(TBI) && !ismutabletype(TBI) - @test ismutabletype(TBM) + @test !isbitstype(TBI) + @test !isbitstype(TBM) @test isbitstype(TC) @testset "aref validation" begin From b009da8a762c9d089e495e3f97d4839e3370fa3e Mon Sep 17 00:00:00 2001 From: nhz2 Date: Mon, 8 Dec 2025 11:37:29 -0500 Subject: [PATCH 3/3] Update benchmarks --- benchmark/Project.toml | 1 + benchmark/runbenchmarks.jl | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/benchmark/Project.toml b/benchmark/Project.toml index 793c965..ce25706 100644 --- a/benchmark/Project.toml +++ b/benchmark/Project.toml @@ -3,6 +3,7 @@ BangBang = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" MutatePlainDataArray = "3b0f367b-da20-4531-811a-c13cc92422b5" Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" +StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [sources] MutatePlainDataArray = {path = ".."} diff --git a/benchmark/runbenchmarks.jl b/benchmark/runbenchmarks.jl index 85f46d8..5f6b88e 100644 --- a/benchmark/runbenchmarks.jl +++ b/benchmark/runbenchmarks.jl @@ -2,6 +2,9 @@ using MutatePlainDataArray using BenchmarkTools using Setfield using BangBang +using StaticArrays + +M = @SMatrix(ones(10,10)) struct BAB a::Int @@ -17,9 +20,9 @@ struct BAI1 c::Int d::Int bab::BAB - m::Float64 + m::typeof(M) end -BAI1() = BAI1(0, 0, 0, 0, BAB(), 100) +BAI1() = BAI1(0, 0, 0, 0, BAB(), M) function inbounds_setinner!_mutate(v, i)