Skip to content

Conversation

@nhz2
Copy link
Member

@nhz2 nhz2 commented Dec 7, 2025

Mark the API as stable. No breaking changes.

@nhz2
Copy link
Member Author

nhz2 commented Dec 8, 2025

CC @MasonProtter @drelatgithub

I really like the more StructArrays.jl style API in https://github.com/MasonProtter/FieldViews.jl and I think that package can be used to experiment with these ideas, while this package can be marked as stable.

Also, interestingly, it seems like the Julia compiler has gotten way better at optimizing BangBang.jl

bench_mutate = Trial(2.016 ns)
BenchmarkTools.Trial: 10000 samples with 1000 evaluations per sample.
 Range (min  max):  2.016 ns  65.124 ns  ┊ GC (min  max): 0.00%  0.00%
 Time  (median):     2.019 ns              ┊ GC (median):    0.00%
 Time  (mean ± σ):   2.063 ns ±  0.950 ns  ┊ GC (mean ± σ):  0.00% ± 0.00%

   ▁▇█▇ ▄         ▂                                     ▂    ▂
  ▄████▁█▇▄▁▁▃▅▅█▁██▆▃▄▁▅▁▁▁▁▁▁▁▁▁▄▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▇██▆▃ █
  2.02 ns      Histogram: log(frequency) by time     2.06 ns <

 Memory estimate: 0 bytes, allocs estimate: 0.
bench_setfield = Trial(2.336 μs)
BenchmarkTools.Trial: 10000 samples with 9 evaluations per sample.
 Range (min  max):  2.336 μs  67.999 μs  ┊ GC (min  max):  0.00%  89.36%
 Time  (median):     3.214 μs              ┊ GC (median):     0.00%
 Time  (mean ± σ):   4.658 μs ±  5.805 μs  ┊ GC (mean ± σ):  18.18% ± 14.18%

  ▃█▆▂▁▁                                                     ▁
  ███████▇█▇▆▆▅▄▅▅▃▄▅▄▃▃▃▅▁▁▄▅▄▄▅▄▁▇▇█▆▅▁▇▇▆▆▆▆▇▇▇▇▇▆▆▆▆▅▆▆▆ █
  2.34 μs      Histogram: log(frequency) by time     33.6 μs <

 Memory estimate: 84.45 KiB, allocs estimate: 3.
bench_bangbang = Trial(2.266 ns)
BenchmarkTools.Trial: 10000 samples with 1000 evaluations per sample.
 Range (min  max):  2.266 ns  18.937 ns  ┊ GC (min  max): 0.00%  0.00%
 Time  (median):     2.270 ns              ┊ GC (median):    0.00%
 Time  (mean ± σ):   2.283 ns ±  0.356 ns  ┊ GC (mean ± σ):  0.00% ± 0.00%

                █    ▅                                        
  ▂▁▁▁▂▁▁▁▁▆▁▁▁▁█▁▁▁▁█▁▁▁▁█▁▁▁▄▁▁▁▁▂▁▁▁▁▂▁▁▁▁▂▁▁▁▁▂▁▁▁▁▂▁▁▁▂ ▂
  2.27 ns        Histogram: frequency by time        2.28 ns <

 Memory estimate: 0 bytes, allocs estimate: 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants