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

chore: add pre compiled benchmarks #2

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

Dav1dde
Copy link
Contributor

@Dav1dde Dav1dde commented Aug 13, 2024

Adds benchmarks which use a pre-compiled data structure, comparing globset's Regex construction is not quite fair, since in a usual usecase you would construct once and cache.

Re-Using the globset::Glob makes matching much faster (also has a positive effect on fast_glob):

simple_match/glob       time:   [315.45 ns 316.19 ns 316.88 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe

simple_match/glob-pre-compiled
                        time:   [106.59 ns 107.32 ns 108.28 ns]
Found 6 outliers among 100 measurements (6.00%)
  4 (4.00%) high mild
  2 (2.00%) high severe

simple_match/globset    time:   [16.032 µs 16.117 µs 16.222 µs]
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) low mild
  6 (6.00%) high severe

simple_match/globset-pre-compiled
                        time:   [45.518 ns 45.680 ns 45.937 ns]
Found 9 outliers among 100 measurements (9.00%)
  4 (4.00%) high mild
  5 (5.00%) high severe

simple_match/glob-match time:   [204.14 ns 204.22 ns 204.31 ns]
Found 8 outliers among 100 measurements (8.00%)
  5 (5.00%) high mild
  3 (3.00%) high severe

simple_match/fast-glob  time:   [82.947 ns 83.165 ns 83.382 ns]

Copy link

codspeed-hq bot commented Aug 13, 2024

CodSpeed Performance Report

Merging #2 will not alter performance

Comparing Dav1dde:pre-compiled-benchmarks (10636a2) with main (4e9778f)

Summary

✅ 7 untouched benchmarks

🆕 3 new benchmarks

Benchmarks breakdown

Benchmark main Dav1dde:pre-compiled-benchmarks Change
🆕 globset-pre-compiled N/A 3.1 µs N/A
🆕 glob-pre-compiled N/A 1.6 µs N/A
🆕 globset-pre-compiled N/A 2.9 µs N/A

@shulaoda
Copy link
Owner

shulaoda commented Aug 13, 2024

Agree. Thanks!

@shulaoda shulaoda merged commit 8293848 into shulaoda:main Aug 13, 2024
3 checks passed
@Dav1dde Dav1dde deleted the pre-compiled-benchmarks branch August 13, 2024 11:32
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.

2 participants