Hacker News
Read post

Blazingly Fast Linked Lists

The post discusses the use of a linked list in a Rust library for data validation, specifically in the context of JSON Schema. It explores various optimization ideas to improve the library's performance, including using alternative data structures, reusing memory allocations, and reducing struct sizes. The linked list implementation achieves a significant performance improvement, with approximately 4.5x improvement for valid inputs and 2.2x improvement for invalid inputs, compared to the naive approach.

    #rust#data-structures
May 14, 2024•14m read time•From dygalo.dev
Post cover image
Table of contents
Validation APIBenchmark setupNaive approachIdea 1: Cheaper clonesIdea 2: Reuse allocationsIdea 3: Linked listIdea 4: Precise memory allocationIdea 5: Avoid temporary VecIdea 6: Struct size optimizationMore ideas that didn't make itBonus idea: Maybe you don't need a linked list?Conclusion
199 Impressions
Hacker News's image
Hacker News

Hacker News is a community-driven platform for sharing and discussing technology news, startups, and...

17.4K Followers

•

141.7K Upvotes

Would you recommend this post?

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