arya dradjica
Programmer who wants to make the world a better place. Trying to help by doing what she's good at: writing efficient code for the long term.
Fascinated by compiler architecture. Well-acquainted with the low-level side of things: memory layouts, concurrent data structures, and SIMD. Privacy advocate. Interested in network protocols, OS design, and programming languages. Dabbling in number theory every once in a while. Looking for ways to bring old hardware back to life---for everyone.
Concerned about ethics. Our _individual_ choices matter.
🏳️⚧️ 🏳️🌈
|
![]()
Working at @nlnetlabs@social.nlnetlabs.nl on open-source Rust-based DNS software. Writing a Rust compiler (https://bal-e.org/speed/krabby) on the side.
Trying to cultivate a community of positivity and constructive knowledge-sharing. Follow requests are filtered accordingly. Mutuals: come talk to me!
I do not want to hear about "AI" or cryptocurrency.
I built my own little benchmarking system in preparation for my RustWeek talk! It's inspired by Criterion, and it can measure multiple statistics (from perf) simultaneously.
> cargo bench --bench perf -- test-data/crates.io-10k.txt
alpha: warming up...
alpha: measuring (307143488 iters)
17.63 ns/iter ± 0.69
52.69 real cycles/iter ± 2.38
53.14 ref cycles/iter ± 2.42
167.68 instructions/iter ± 3.36
0.38 LLC refs/iter ± 0.03
0.05 LLC misses/iter ± 0.01
26.28 branches/iter ± 0.40
0.50 branch mispreds/iter ± 0.07
beta: warming up...
beta: measuring (350176962 iters)
15.42 ns/iter ± 0.71
45.83 real cycles/iter ± 2.42
46.15 ref cycles/iter ± 2.48
142.52 instructions/iter ± 2.68
0.34 LLC refs/iter ± 0.03
0.05 LLC misses/iter ± 0.01
22.04 branches/iter ± 0.36
0.48 branch mispreds/iter ± 0.07
Now to apply all the optimizations I have in mind and watch these per-iter counts go down :D
An update on Krabby: There's a Zulip chat now! I wrote a little status update on the blog: https://bal-e.org/speed/krabby/hi-zulip-also-licenses/. Take a look!
I might put together a bibliography of academic papers on concurrent memory reclamation. I built my own reclaimer by looking at two existing Rust crates, and not going much further; I thought there was little academic research in the field, but it turns out there are quite a few papers! I really want to compare the performance of different implementations, but FFI would complicate things significantly. I'll probably put that bibliography (perhaps with some comments, so closer to a catalog of some kind) in my repository.
I'm a little surprised that Rust/LLVM doesn't optimize away certain atomic operations. See https://play.rust-lang.org/?version=stable&mode=release&edition=2024&gist=c9f0f10929e66817a7df54775eb46f52 (compile to assembly in release mode); an unused atomic load (with Relaxed or Acquire ordering) won't be elided, and an atomic swap with unused loaded value won't be downgraded to a store. I'm fairly confident that the atomic loads can be elided, but I'm willing to believe that the downgrading the RMW swap operation might affect e.g. release-acquire sequences. Perhaps these atomic operations are so rare (and usually, hopefully, done properly) that optimizing them is not worthwhile?