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

feat(RUST): String detection is performed using SIMD techniques #1752

Merged
merged 13 commits into from
Jul 22, 2024

Conversation

kitty-eu-org
Copy link
Contributor

@kitty-eu-org kitty-eu-org commented Jul 22, 2024

What does this PR do?

Using SIMD technology to speed up string detection

Related issues

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

In fury/rust, run

cargo bench

result:

SIMD sse short          time:   [992.07 ps 993.91 ps 995.81 ps]                            
                        change: [-1.1907% -0.7021% -0.2276%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe

SIMD sse long           time:   [368.88 ns 369.70 ns 370.59 ns]                          
                        change: [-1.1407% -0.4415% +0.1537%] (p = 0.20 > 0.05)
                        No change in performance detected.
Found 11 outliers among 100 measurements (11.00%)
  9 (9.00%) high mild
  2 (2.00%) high severe

SIMD avx short          time:   [4.4313 ns 4.4425 ns 4.4566 ns]                            
                        change: [-0.4239% -0.0440% +0.3277%] (p = 0.82 > 0.05)
                        No change in performance detected.
Found 9 outliers among 100 measurements (9.00%)
  5 (5.00%) high mild
  4 (4.00%) high severe

SIMD avx long           time:   [18.215 ns 18.277 ns 18.351 ns]                           
                        change: [+0.6658% +1.0962% +1.6058%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 9 outliers among 100 measurements (9.00%)
  5 (5.00%) high mild
  4 (4.00%) high severe

Standard short          time:   [5.1115 ns 5.1670 ns 5.2491 ns]                            
                        change: [+0.5348% +1.5193% +2.5623%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

Standard long           time:   [3.6904 µs 3.7205 µs 3.7606 µs]                           
                        change: [+1.5445% +2.5638% +3.9167%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 13 outliers among 100 measurements (13.00%)
  7 (7.00%) high mild
  6 (6.00%) high severe

Copy link
Collaborator

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, Looks Great to me

@chaokunyang
Copy link
Collaborator

There are some CI failures, could you fix it? @kitty-eu-org

@kitty-eu-org
Copy link
Contributor Author

There are some CI failures, could you fix it? @kitty-eu-org

Already fixed

@chaokunyang chaokunyang merged commit c09f5b9 into apache:main Jul 22, 2024
32 checks passed
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