Go Developers
simon125q's profile
Szymon Omieciński@simon125q•Oct 28, 2025
25.3K
Post cover image

How Memory Maps (mmap) Deliver 25x Faster File Access in Go

Avatar of hnHacker News•From info.varnish-software.com•Oct 24, 2025•4m read time

Memory maps (mmap) can dramatically improve file I/O performance by mapping files directly into virtual memory, eliminating expensive system calls. Benchmarks demonstrate 25x faster read operations compared to traditional seek/read approaches in Go. While highly effective for reading, memory maps are inefficient for writes due to page fault overhead. The technique proved crucial in optimizing an HTTP-backed filesystem for AI storage acceleration, reducing database lookup times from 1200ns to under 50ns by replacing ReaderAt with mmap-based implementation.

Sort:

simon125q's user avatar
Szymon Omieciński
@simon125q
Joined Aug 7. 2024
25.3K

Student | Backend | Go | Python | Linux | NeoVim

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard