Skip to content
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

Improve morph algorithm #9

Merged
merged 3 commits into from
Jun 29, 2024
Merged

Improve morph algorithm #9

merged 3 commits into from
Jun 29, 2024

Conversation

niktekusho
Copy link
Owner

  • Add benchmack to verify if new algorithm is faster or slower.

@niktekusho
Copy link
Owner Author

New algo seems a lot faster (output from GitHub Action run)

applyRuleset: 88.778ms
stats { rules: 100, goodFile: 10000 }
applyRuleset: 26.047ms
stats { rules: 100, goodFile: 10000 }
┌─────────┬─────────┐
│ (index) │ Values  │
├─────────┼─────────┤
│ oldTime │ 89      │
│ newTime │ 26      │
│ fastest │ 'new'   │
│ speedup │ '3.42x' │
└─────────┴─────────┘

@niktekusho niktekusho marked this pull request as ready for review June 29, 2024 14:48
@niktekusho niktekusho force-pushed the feat/better-algorithm branch from 135ddeb to 62974b8 Compare June 29, 2024 15:37
niktekusho and others added 3 commits June 29, 2024 17:41
- Add benchmack to verify if new algorithm is faster or slower.

From the GitHub worflow:

```
stdout | src/morph/benchmark/benchmark.test.ts > morph 10.000 artifacts with 100 rules
applyRuleset: 98.706ms
stats { rules: 100, goodFile: 10000 }
applyRuleset: 30.292ms
stats { rules: 100, goodFile: 10000 }
┌─────────┬─────────┐
│ (index) │ Values  │
├─────────┼─────────┤
│ oldTime │ 99      │
│ newTime │ 31      │
│ fastest │ 'new'   │
│ speedup │ '3.19x' │
└─────────┴─────────┘
```
@niktekusho niktekusho force-pushed the feat/better-algorithm branch from 62974b8 to c3a588a Compare June 29, 2024 15:47
@niktekusho niktekusho merged commit d6491b4 into main Jun 29, 2024
2 checks passed
@niktekusho niktekusho deleted the feat/better-algorithm branch June 29, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant