S benchmark doing 2x work
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- performance, testing
Research direction
Locate the benchmark source referenced in the issue and compare the S implementation with the other signal implementations. Check the node creation and batching setup, then update the benchmark results after correcting those differences; the issue does not name a specific file or test command.
Written by the indexing model from the issue text.
Description
Hi Andrea --
I've seen this benchmark used in a couple other signal implementations but haven't traced down the source. Do you know where it comes from? It has some weird pieces in the S implementation. For instance, this line ...
S(props.a), S(props.b), S(props.c), S(props.d);
... means that S is actually creating 2 nodes in every place where the other libraries are creating only 1. So S is doing twice the work of the others.
It also disables batching for S but no other library, which seems weird. S should have:
const run = BATCHED ? S.freeze : (fn) => fn();
Would you mind fixing those in your copy and updating the results?
Other than those issues specific to S, this is almost the worst possible benchmark if you're trying to improve actual application performance. All it tests is update speed of deep intermediate nodes, which happens rarely to never. It doesn't test creation time or memory usage at all, even though those are the biggest factors in app performance.
Overall, though, it's cool to see other fast signals implementations come out. I'm reading through usignal, neat stuff!
-- Adam
- Dominant language
- JavaScript
- Stars
- 268
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[quality] useFocusTrap's Shift+Tab wrap and non-Tab/non-Escape key arms are never driven end to endPossibly taken @hivecommons-hive claimed this today. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/gh-aw-workshop#4220 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
JuliusBrussee/caveman#1189 ·
Maintainers usually reply within 1 day
-
priority:low ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenHands/extensions#738 ·
Maintainers usually reply within 1 day