v0.13.3
What's changed
β‘ v0.13.3 is primarily a performance release. While blinkDB is a read optimized database, this time we heavily optimized insertions.
- Fixed issue with failing benchmarks. Some benchmarks were throwing errors that were not reported back to the runner, and the benchmarking framework was not running prerequisite hooks on warmup, leading to false reports. These issues have been fixed, and benchmarks like
insertManynow report back correctly. insertManyperformance optimizations. Thanks to @Valerionn,insertManyis now up to +45% faster by removing the need to allocate event objects if no events are registered on insert.- general performance optimizations. All blinkDB packages now compile directly to ES6, and public functions return Promises directly instead of using the
asyncfunction modifier. Because this removes the need for TS to include wrapper functions for async code, which is a constant overhead, this resulted in an increase of performance in all public functions in theblinkdbpackage ranging from +5% (O(n log n)operations likeinsertMany&upsertMany) to +80% (O(1)operations likecount).
As an example, on the insert-many benchmark, BlinkDB went from this:
blinkdb/insert-many.ts --- lokijs is 1.51x faster than blinkdb
βββββββββββ¬ββββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββββββ¬ββββββββββββ¬ββββββββββ
β (index) β name β ops/sec β Average Time (ns) β Margin β Samples β
βββββββββββΌββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββΌββββββββββββΌββββββββββ€
β 0 β 'lokijs' β 256.3883418534088 β 3900333.3488999065 β 'Β±8.15%' β 129 β
β 1 β 'blinkdb' β 169.8885317147108 β 5886212.505969931 β 'Β±17.15%' β 85 β
βββββββββββ΄ββββββββββββ΄ββββββββββββββββββββ΄βββββββββββββββββββββ΄ββββββββββββ΄ββββββββββ
to this:
blinkdb/insert-many.ts --- blinkdb is 1.04x faster than lokijs
βββββββββββ¬ββββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββββββ¬ββββββββββββ¬ββββββββββ
β (index) β name β ops/sec β Average Time (ns) β Margin β Samples β
βββββββββββΌββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββΌββββββββββββΌββββββββββ€
β 0 β 'blinkdb' β 310.7162169122418 β 3218370.801297566 β 'Β±10.35%' β 156 β
β 1 β 'lokijs' β 298.5117428378887 β 3349951.9666905203 β 'Β±9.36%' β 150 β
βββββββββββ΄ββββββββββββ΄ββββββββββββββββββββ΄βββββββββββββββββββββ΄ββββββββββββ΄ββββββββββ
Full Changelog: v0.13.2...v0.13.3