I had a crazy dream in which PHP 9 had been released, so I changed my PHP classes to align in memory and optimised the hell out of my code. Then I woke up and realised that PHP 9 doesn't exist and PHP is still heap-only
đ„Č so sad...
I had a crazy dream in which PHP 9 had been released, so I changed my PHP classes to align in memory and optimised the hell out of my code. Then I woke up and realised that PHP 9 doesn't exist and PHP is still heap-only
đ„Č so sad...
About memory pressure, lock contention, and Data-oriented Design
https://mnt.io/articles/about-memory-pressure-lock-contention-and-data-oriented-design/
#HackerNews #memorypressure #lockcontention #dataorienteddesign #softwareengineering #performanceoptimization

I illustrate how _Data-oriented Design_ helped to remove annoying memory pressure and lock contention in multiple sorters used in the Matrix Rust SDK. It has improved the execution by 98.7% (53ms to 676”s) and the throughput by 7718.5% (from 18K elem/s to 1.4M elem/s)! I will talk about how the different memories work, how we want to make the CPU caches happy, and how we can workaround locks when they are a performance bottleneck.
đŁ New blog post
About memory pressure, lock contention, and Data-oriented Design, https://mnt.io/articles/about-memory-pressure-lock-contention-and-data-oriented-design/.
I illustrate how Data-oriented Design helped to remove annoying memory pressure and lock contention in multiple sorters used in the Matrix Rust SDK. It has improved the execution by 98.7% (53ms to 676”s) and the throughput by 7718.5% (from 18Kelem/s to 1.4Melem/s)!
Most Java applications carry a service layer by default.
Often without questioning why.
In this hands-on Quarkus tutorial, I build a complete Order API without services.
Business logic lives in pure functions.
All outcomes are modeled explicitly with records and sealed types.
Less indirection.
Better tests.
Clearer code.
đ https://www.the-main-thread.com/p/data-oriented-programming-java-quarkus
I broke down Event Sourcing in Quarkus using Java records, sealed types, pure functions, and a clean CQRS split.
Fully hands-on. No magic. Just data, folds, and clear architecture.
If you want to understand event sourcing without the hype, this one is for you.
đ https://www.the-main-thread.com/p/event-sourcing-quarkus-java-records-cqrs-tutorial
#MoonBit looks like a really interesting new #ProgrammingLanguage
Especially its functional, data-oriented design and #WASM support stand out to me.
Looks _a lot_ like #Rust, but more functional in style. âš
It is expected to reach 1.0 this year. đ
#FunctionalProgramming #RustLang #MoonBitLang #DoD #DataOrientedDesign
I've been programming professionally for almost thirty years. I'm a fan of OOP; it has served me very well.
Java has been making a lot of changes and at first I didn't see the point. Why use sealed classes and pattern matching when a good ol' object hierarchy would do the job?
I discovered "data oriented design", how it's the "opposite" of OOP, and am starting to grasp when it'd make more sense
Practical Data-oriented Design, https://www.youtube.com/watch?v=IroPQ150F6c by @andrewrk. That's an amazing talk, with concrete examples on the Zig compiler.
Andrew Kelley - Practical #DOD
In this #talk, Andrew Kelley (creator of #ZigLang), presents how they've sped up the #Zig #compiler and significantly reduced its memory usage by applying data-oriented design for the compiler's data structures.
A phenomenal talk! I highly recommend it.
#SoA crate for #Rust (I found the talk linked in the README):
https://github.com/tim-harding/soa-rs
#DataOrientedDesign #Performance #SoftwareEngineering #RustLang