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

use SIMD in copy_match #190

Closed
wants to merge 2 commits into from
Closed

use SIMD in copy_match #190

wants to merge 2 commits into from

Conversation

folkertdev
Copy link
Collaborator

the implementation is beautiful, but it does not actually help with our benchmarks. Overall copy_match is 1% to 2% of total runtime, so even though this should be faster, it really doesn't matter in the big picture.

Benchmark 1 (82 runs): ./uncompress-baseline rs-chunked 5 silesia-small.tar.gz
  measurement          mean ± σ            min … max           outliers         delta
  wall_time          61.1ms ±  771us    60.2ms … 65.2ms          4 ( 5%)        0%
  peak_rss           24.1MB ± 67.9KB    23.9MB … 24.1MB          0 ( 0%)        0%
  cpu_cycles          242M  ± 2.87M      240M  …  261M           8 (10%)        0%
  instructions        689M  ±  259       689M  …  689M           1 ( 1%)        0%
  cache_references   3.01M  ±  350K     2.81M  … 6.05M           2 ( 2%)        0%
  cache_misses        135K  ± 20.6K      109K  …  205K           2 ( 2%)        0%
  branch_misses      3.32M  ± 2.66K     3.32M  … 3.33M           2 ( 2%)        0%
Benchmark 2 (85 runs): target/release/examples/blogpost-uncompress rs-chunked 5 silesia-small.tar.gz
  measurement          mean ± σ            min … max           outliers         delta
  wall_time          59.3ms ±  682us    58.4ms … 62.0ms          5 ( 6%)        ⚡-  2.9% ±  0.4%
  peak_rss           24.1MB ± 70.0KB    23.9MB … 24.1MB          0 ( 0%)          +  0.0% ±  0.1%
  cpu_cycles          233M  ± 2.08M      232M  …  241M          13 (15%)        ⚡-  3.6% ±  0.3%
  instructions        681M  ±  280       681M  …  681M           0 ( 0%)        ⚡-  1.2% ±  0.0%
  cache_references   3.15M  ±  311K     2.82M  … 5.41M           3 ( 4%)        💩+  4.5% ±  3.3%
  cache_misses       80.5K  ± 25.0K     42.0K  …  164K           5 ( 6%)        ⚡- 40.6% ±  5.1%
  branch_misses      3.13M  ± 2.98K     3.12M  … 3.15M           6 ( 7%)        ⚡-  5.7% ±  0.0%
@folkertdev folkertdev changed the title Copy match simd use SIMD in copy_match Sep 19, 2024
@folkertdev
Copy link
Collaborator Author

idk, maybe this will be useful at some point, but for now we just cannot justify that much unsafe for no measurable gain.

@folkertdev folkertdev closed this Sep 19, 2024
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