Git Product home page Git Product logo

Comments (4)

fintelia avatar fintelia commented on September 26, 2024 1

Portable SIMD isn't available in stable Rust yet, so any use would have to be behind an unstable feature flag as we did for the png crate. (And even once it stabilizes we'd still have to wait until it was present in our MSRV before enabling it by default.)

The other consideration is that manually using SIMD has to be "worth it". The Rust compiler is very good at auto-vectorization so that should always be attempted first. And even when that's not possible, there has to be an impactful enough performance difference to justify making the code more complex.

from image.

JulianKnodt avatar JulianKnodt commented on September 26, 2024

sounds good, for now I'll avoid using it, but I'll try to fix up the code so that it's more amenable to optimization.
Right now I'm running the code in a hot path and I've found it to be slow,
I've also chucked it into godbolt and it's about 300 lines of asm with -O, so I'll try to shrink it down

from image.

Shnatsel avatar Shnatsel commented on September 26, 2024

@JulianKnodt note that -O on godbolt does not optimize as much as cargo build --release does. You need to pass -Copt-level=3 to get the high optimization level that includes auto-vectorization.

I've been banging my head for two hours on why the compiler won't autovectorize something, and it turned out that I was using -O on godbolt. I hope I am not too late to spare you this fate!

from image.

JulianKnodt avatar JulianKnodt commented on September 26, 2024

ah I didn't realize that, but I've updated the interpolation code to be more efficient in the unoptimized case, which is probably still good in the vectorized case: #2078

from image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.