-
Notifications
You must be signed in to change notification settings - Fork 410
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
perf(fifo-queue): use linked list structure for queue #2629
Conversation
I did try a linked list implementation, but when I ran the benchmarks it was much slower than using the old implementation. Did you notice any performance improvements? |
I think the array implementation is so efficient in V8, that even an algorithmically better implementation may not give the expected results... |
I executed this test for example in a loop of 100 iterations:
these are the results I'm getting:
|
87ec3e9
to
b925eca
Compare
These results are promising. I will benchmark with actual job processing to make sure it does not regress performance in real use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I would just want to benchmark with real jobs for extra verification. Give me a couple of days.
9ee8acb
to
78d82c7
Compare
78d82c7
to
e9b19af
Compare
I run the tests in https://github.com/taskforcesh/bullmq-bench but I cannot find any noticeable improvement or decrease in performance. In my M2 using old implementation 43307 jobs/sec, using new 43651 jobs/sec. But this varies between runs, sometimes one is faster and the other is slower or viceversa. |
e9b19af
to
3bcaee0
Compare
As our internak conversación, there could be other bottlenecks that affects our benchmark. Merging this pr at least for a minimal improvement as previous tests isolate only array and list implementation |
## [5.12.9](v5.12.8...v5.12.9) (2024-08-17) ### Performance Improvements * **fifo-queue:** use linked list structure for queue ([#2629](#2629)) ([df74578](df74578))
No description provided.