-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark against level #4
Comments
It's not due to binary. Happens on any encoding when this code path is triggered: abstract-level/abstract-level.js Lines 299 to 301 in d711af3
V8 has a performance issue with the spread operator when properties are not present. The following "fixes" it: options.keyEncoding = keyFormat
options.valueEncoding = valueFormat
options = { ...options, keyEncoding: keyFormat, valueEncoding: valueFormat } As does using Could switch to |
When compared to `level@7` and friends. Ref #4 (comment) Ref https://bugs.chromium.org/p/chromium/issues/detail?id=1204540
When compared to `level@7` and friends. Ref #4 (comment) Ref https://bugs.chromium.org/p/chromium/issues/detail?id=1204540
Quick-and-dirty benchmark of streams, comparing Unrelated to
|
Did a better benchmark of streams. This one takes some explaining. In the graph legend below:
Where "byte-hwm" is the highWaterMark on the C++ side, measured in bytes. And "stream-hwm" is the highWaterMark of object-mode streams, measured in amount of entries. That's about half of the explainer needed... In hindsight I wish I didn't do the
TLDR: we're good. Most importantly, the performance characteristics of streams and iterators did not change, in the sense that an app using smaller or larger values (I used 100 bytes) would be hurt by upgrading to |
Done in Level/classic-level#1 |
Compare:
level@7
againstclassic-level
. To test the native part (now using encoding options instead of*asBuffer
). Not expecting a change here.level-mem
+subleveldown
againstmemory-level
+ sublevels, with json encoding. To test the JS part. Expecting a slight improvement here, though it might only surface in real-world apps (with GC pressure) rather than a synthetic benchmark.level-mem
againstmemory-level
, as it removes two (or three, with sublevels) iterations of the batch array.A quick benchmark is enough (of reads and writes). It's just to check that performance is equal or better.
The text was updated successfully, but these errors were encountered: