Linked lists are often taught in programming courses but are rarely used in real-world projects, overshadowed by other data structures. In this post, the author demonstrates the superior performance of linked lists over Vec in a data validation library implementation. By utilizing the concept of graph traversals, the library can accurately pinpoint errors in input data. Various optimization strategies, such as using cheaper clones and precise memory allocation, are explored to enhance performance. Surprisingly, the author introduces a novel approach by implementing a linked list to store path segments during traversal, eliminating the need for heap allocations entirely. The results show significant performance improvements for valid inputs, showcasing the benefits of precise memory allocation in linked list implementations.
https://dygalo.dev/blog/blazingly-fast-linked-lists/