{
  "id": 16282836,
  "title": "How close can pure functional programming get to C?",
  "url": "https://urgent.news/2026/10/24/how-close-can-pure-functional-programming-get-to-c",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-24T03:43:54.000Z",
  "source": {
    "name": "Hacker News",
    "slug": "hacker-news",
    "url": "https://rtfeldman.com/fp-vs-c"
  },
  "original_language": "en",
  "account": "In the article \"Why Lean is Faster Than Rust,\" the author presents a remarkable finding: a DEFLATE compression library crafted in Lean 4, a functional programming language and proof assistant, surpasses a comparable Rust package with over a billion downloads. According to the article, lean-zip maintains the same compression at higher throughput. However, lean-zip falls short when compared to libdeflate, the top performer in DEFLATE performance, written in C. Despite this, Roc, a functional programming language with a focus on runtime performance, could potentially bridge the gap. Roc's design emphasizes both speed in running and compiling, and while it's still in its early stages with a nascent package ecosystem, it boasts a strong foundation for performance improvements. The author, after optimizing roc-deflate, a package written by Niclas Ahden, aims to reduce the performance gap between Roc and libdeflate, particularly focusing on non-streaming APIs. The benchmarks, conducted on a 2021 M1 MacBook Pro and an AMD Ryzen 9 3900X, indicate that roc-deflate lags behind libdeflate in most cases by around 8.9% in the median performance for the AMD Ryzen 3900X, and 2.6% on the M1 MacBook Pro.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}