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

Benchmark against simd math functions from core::intrinsics::simd #3

Merged
merged 3 commits into from
May 11, 2024

Conversation

NamorNiradnug
Copy link
Owner

No description provided.

@NamorNiradnug
Copy link
Owner Author

NamorNiradnug commented Apr 24, 2024

На моем ноутбуке выдает такое:

test llvm_vec_exp      ... bench:     944,499 ns/iter (+/- 7,318)
test llvm_vec_sin      ... bench:     961,830 ns/iter (+/- 10,572)
test scalar_sin_bench  ... bench:     985,468 ns/iter (+/- 7,642)
test vec_sin_bench     ... bench:     133,412 ns/iter (+/- 976)
test vec_sin_cos_bench ... bench:     146,397 ns/iter (+/- 1,339)

Ура, оно работает сильно хуже, чем то, что у меня VCL! Юхуу

@NamorNiradnug
Copy link
Owner Author

NamorNiradnug commented Apr 24, 2024

test bench_cos_f32_core_simd ... bench:     961,397 ns/iter (+/- 25,370)
test bench_cos_f32_scalar    ... bench:     970,129 ns/iter (+/- 17,319)
test bench_cos_f32_vec       ... bench:     131,046 ns/iter (+/- 2,032)
test bench_cos_f64_core_simd ... bench:   1,973,315 ns/iter (+/- 18,569)
test bench_cos_f64_scalar    ... bench:   1,899,518 ns/iter (+/- 11,374)
test bench_cos_f64_vec       ... bench:     500,811 ns/iter (+/- 5,891)
test bench_sin_f32_core_simd ... bench:     968,157 ns/iter (+/- 8,476)
test bench_sin_f32_scalar    ... bench:   1,010,247 ns/iter (+/- 19,708)
test bench_sin_f32_vec       ... bench:     136,389 ns/iter (+/- 1,070)
test bench_sin_f64_core_simd ... bench:   1,935,117 ns/iter (+/- 7,962)
test bench_sin_f64_scalar    ... bench:   1,867,211 ns/iter (+/- 18,490)
test bench_sin_f64_vec       ... bench:     490,637 ns/iter (+/- 5,658)

даже хуже, чем скалярное для f64...

... что-то мне это не нравится

@NamorNiradnug
Copy link
Owner Author

UPD: ну, просто в Rust эти интринсики на работают: rust-lang/portable-simd#76.

Copy link
Collaborator

@asokol123 asokol123 left a comment

Choose a reason for hiding this comment

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

Огонь

benches/math.rs Outdated Show resolved Hide resolved
@NamorNiradnug NamorNiradnug merged commit fac870e into main May 11, 2024
6 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