MLabs Publications
The many minds at MLabs present news, case studies, editorials, tutorials, whitepapers, Cardano Catalyst proposals, and more.
Performance, pull arrays and Plut{arch, us}
We introduce PPullArray: a fused, high-performance array API for Plutarch built on CIP-138. Learn how it simplifies array operations, eliminates intermediates, and brings measurable speedups to Cardano’s on-chain computation.
Fast Findings with SWAR and the FFI: The Good, the Bad, and the Inefficient
In this post, we compare three ways to find the first matching byte in an ASCII sequence—naive loops, SWAR (SIMD Within A Register) techniques, and the C memchr via Haskell’s FFI. You’ll learn how each performs in real benchmarks, where FFI can deliver 50× speedups, and why overhead can erase those gains in certain workloads.
Our Performance is massiv: Getting the Most Out of Your Hardware in Haskell
In this post, we explore how to write high-performance Haskell code using multi-dimensional arrays—comparing vector and massiv across clarity, parallelism, and raw speed. You'll learn how array layout, indexing strategies, and stencil-based computation can unlock massive performance gains by leveraging modern hardware more effectively.