Our great sponsors
-
I think you might be overestimating the difficulty of implementing hash maps and underestimating the complexity of implementing skip lists. For example, the top C library for skip lists on google (which looks relatively clean to me) is more than 3x longer than the C hash map library I wrote (534 lines of C vs 171). My library is a stripped-down version of Lua's table implementation, which uses chained scatter tables with a slight tweak that trades a bit of insertion-time work to improve lookup times.
-
I think you might be overestimating the difficulty of implementing hash maps and underestimating the complexity of implementing skip lists. For example, the top C library for skip lists on google (which looks relatively clean to me) is more than 3x longer than the C hash map library I wrote (534 lines of C vs 171). My library is a stripped-down version of Lua's table implementation, which uses chained scatter tables with a slight tweak that trades a bit of insertion-time work to improve lookup times.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Lua
Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.
I think you might be overestimating the difficulty of implementing hash maps and underestimating the complexity of implementing skip lists. For example, the top C library for skip lists on google (which looks relatively clean to me) is more than 3x longer than the C hash map library I wrote (534 lines of C vs 171). My library is a stripped-down version of Lua's table implementation, which uses chained scatter tables with a slight tweak that trades a bit of insertion-time work to improve lookup times.
-
sqlx
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite. (by launchbadge)
I'm curious if you could explain more about when you use BTreeMap. In my experience, I almost never need to have a sorted iteration over a mapping. You mentioned databases (which obviously do require sorting and mapping), but in my experience, those are usually just implemented as hyper-optimized bespoke black box libraries, not the sort of thing that really needs a general-purpose BTreeMap implementation (e.g. the Rust sqlx library doesn't use BTreeMaps for the core database logic, just for some minor caching/metadata stuff).