Description
The current used version of mdbx-go is v0.27.24, and the latest version of mdbx is v0.39.1.Between version v0.27.24 and v0.39.1, mdbx-go has undergone significant improvements and optimizations, mainly in the following aspects:
- Underlying MDBX Version Upgrade
In the earlier v0.27.24 release, the codebase was relatively simple (for example, adjustments like "rm config.h" were present). In later versions (such as the v0.38.x series), the project has integrated a newer version of MDBX (e.g., v0.12.10), meaning that the underlying database engine has received numerous performance optimizations and feature enhancements.
- Reduction of CGO Call Overhead
Several commits targeted the overhead associated with passing parameters during cross-language calls. For instance:
In versions v0.38.2 and v0.38.3, improvements were made for "passing keys" by optimizing non-pointer usage, thereby reducing unnecessary copying and conversions during CGO parameter passing.
In v0.38.1, further optimizations were applied to the process of passing values, avoiding unnecessary pointer conversions, which in turn lowers the fixed cost per call.
These changes can significantly reduce the performance penalty incurred by frequent CGO calls in high-frequency scenarios such as data insertions and lookups.
- API Simplification and Internal Refactoring
In v0.38.4, functions like getVal were simplified, making the code structure clearer and easier to maintain, while potentially also improving performance.
Additionally, in v0.39.0, a new Label parameter was added to the Env, which helps improve error message clarity and debugging in the future.
- Other Bug Fixes and Improvements
Throughout the evolution (including adjustments in v0.37.2, such as closing cursors properly), numerous bug fixes and code cleanups have been performed to lay a solid foundation for subsequent releases.
In summary, from v0.27.24 to v0.39.1, mdbx-go has not only upgraded the underlying MDBX engine but also made extensive improvements in optimizing CGO call overhead, cleaning up the API, and refactoring internal code. These changes help reduce the cost of crossing the language boundary in high-frequency operations like data insertions and lookups, thereby enhancing overall performance and maintainability.
Activity