this post was submitted on 14 Jul 2023
2 points (100.0% liked)

Rust

7136 readers
4 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
top 4 comments
sorted by: hot top controversial new old
[–] aloso@programming.dev 2 points 2 years ago

The reddit thread has some interesting discussion, and a solution using no SIMD intrinsincs that is more than 200x faster, by using .chunks_exact(), and letting the compiler auto-vectorize it.

[–] wim@lemmy.sdf.org 1 points 2 years ago* (last edited 2 years ago) (1 children)

The title is extremely misleading. They're comparing a Rust program using SIMD intrinsics to a Rust program which doesn't, without even using auto vectorization to let the driver look for SIMD opportunities.

This is a good example of why SIMD is useful and how fast it can be, but it is not an example of how Rust is faster than C or how humans are smarter than compilers. It doesn't even have a C reference source to compare to at all.

[–] allan@lemmyrs.org 1 points 2 years ago (1 children)

The link to the original post had the original code referenced, it seems, and extremely misleading is a bit strong to me..

I'm still boggled by just using idiomatic rust iterators giving multiple times performance. Then it quickly gets too golfy for real life, imo

[–] snaggen@programming.dev 1 points 2 years ago

This post seems to have taken the title from a previous post that this is built upon. So that is probably why the title gets a bit confusing when viewed standalone.