-
Notifications
You must be signed in to change notification settings - Fork 21
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
added xania's implementation to the bench #13
base: main
Are you sure you want to change the base?
Conversation
Hi @mihar-22, thank you for making this benchmark possible, it immediately pointed out fuctional and performance issues in my library that I needed to fix. I ran the benchmark on my machine many times and the conclusion is the same every time. Somehow is maverick only faster on the first column. I also don't understand how preact's implementation is much faster. |
Hey @xania! There could be a few reasons it's faster:
|
@mihar-22
|
I've found some more perf optimizations How is 10 almost double the 100 for xania? So I also tried more smaller test cases to understand the seemingly relative high overhead of xania in those cases but then I got these results: results for less then 10 are kind random on my machine at least. I also added the total column which is perfectly stable in determining the rank of libs. But it gets more confusing. when I just flip the tiers then I get these results Seems like a conditional warming up issue, but only when the first case is 10 and the lib is xania?? |
It turns out that this is really useful for UI libraries, such as when hiding (and removing) element from the DOM. For example, Solid implements a Show component by doing something like |
That's reasonable, it still aligns with the design I had in mind because we cannot just randomly remove a node in the graph. But when we do remove a node like in your example that node is well defined as part of the graph definition. And because of that I can add that as a feature without impact on perf. |
It turns out this is achieved by monadic bind Example const a = new State(1);
const b = new State("even");
const c = new State("odd");
const d = a.bind(x => x % 2 === 0 ? b : c); In this example |
@mihar-22 |
6ebfe0f
to
059e054
Compare
8aae6af
to
2c2a048
Compare
No description provided.