Skip to content

stream: change bufferlist to fixedqueue - #49754

Closed
benjamingr wants to merge 1 commit into
nodejs:mainfrom
benjamingr:fixedqueue-and-not-bufferlist
Closed

benjamingr wants to merge 1 commit into
nodejs:mainfrom
benjamingr:fixedqueue-and-not-bufferlist

Conversation

@benjamingr

@benjamingr benjamingr commented Sep 21, 2023 •

Copy link
Copy Markdown
Member

Strings are still broken, this isn't optimal and is just an attempt to use FixedQueue instead of BufferList in Readable cc @ronag (I think we can do better and stick with a growing/shrinkng FixedQueue btw due to the "inter buffer slicing")

cc @ronag @anonrig

This is WIP

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Sep 21, 2023
@benjamingr

Copy link
Copy Markdown
Member Author

}
consume(n, hasStrings) {
let ret;
// n < this.tail.top - this.tail.bottom but accountng to othe fact

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// n < this.tail.top - this.tail.bottom but accountng to othe fact
// n < this.tail.top - this.tail.bottom but accounting for other fact

@rluvaton

Copy link
Copy Markdown
Member

ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1404

02:43:19.569                                                 confidence improvement accuracy (*)   (**)  (***)
02:43:19.569 streams/creation.js kind='duplex' n=50000000           ***    -76.62 %       ±1.36% ±1.84% ±2.43%
02:43:19.569 streams/creation.js kind='readable' n=50000000         ***    -87.63 %       ±1.28% ±1.73% ±2.30%
02:43:19.569 streams/creation.js kind='transform' n=50000000        ***    -76.48 %       ±2.61% ±3.51% ±4.66%
02:43:19.569 streams/creation.js kind='writable' n=50000000         ***      5.75 %       ±2.59% ±3.48% ±4.60%
02:43:19.569 streams/destroy.js kind='duplex' n=1000000              NA       NaN %           NA     NA     NA
02:43:19.569 streams/destroy.js kind='readable' n=1000000            NA       NaN %           NA     NA     NA
02:43:19.569 streams/destroy.js kind='transform' n=1000000           NA       NaN %           NA     NA     NA
02:43:19.569 streams/destroy.js kind='writable' n=1000000                   -0.10 %       ±4.04% ±5.37% ±6.99%
02:43:19.569 streams/pipe-object-mode.js n=5000000                  ***     15.13 %       ±2.81% ±3.73% ±4.86%
02:43:19.569 streams/pipe.js n=5000000                               NA       NaN %           NA     NA     NA
02:43:19.569 
02:43:19.569 Be aware that when doing many comparisons the risk of a false-positive
02:43:19.569 result increases. In this case, there are 10 comparisons, you can thus
02:43:19.569 expect the following amount of false-positive results:
02:43:19.569   0.50 false positives, when considering a   5% risk acceptance (*, **, ***),
02:43:19.569   0.10 false positives, when considering a   1% risk acceptance (**, ***),
02:43:19.569   0.01 false positives, when considering a 0.1% risk acceptance (***)

also it seems like there are a LOT of out of memory in the benchmark

@benjamingr

Copy link
Copy Markdown
Member Author

looks like a correctness bug

@benjamingr

Copy link
Copy Markdown
Member Author

Superceded by #50341

@benjamingr benjamingr closed this Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants