Git Product home page Git Product logo

Comments (3)

nikomatsakis avatar nikomatsakis commented on August 15, 2024

The intention was to able to be supply a weight, yes, and perhaps some methods to experimentally determine a good weight on sample workloads.

from rayon.

nikomatsakis avatar nikomatsakis commented on August 15, 2024

In response to this comment by @mneumann from #9:

This is sort of roughly what I had in mind, but it'd probably be a stage in the algorithm. Something like foo.into_par_iter().map().weight(22), which would indicate that the map operation takes "22x" the default time. This is trivial to implement, but you'd have to just kind of guess what the right number is (well, experiment). I am also rather concerned about the portability of these constants, both across machines/workloads and across releases of rayon.

One way to address that would be to have (and encourage the use of) an "autotune" option, where you provide a pipeline and a sample, and we vary the weights to find the one that seems to be running best. But that itself will be sensitive to whatever else the machine happens to be doing at the time which you tune, and it assumes you have some convenient time to do that tuning and data to tune with.

Overall, I'd rather find something more automatic -- and just optimizing join and the overall dispatch is perhaps the best answer I know of there -- but allowing one to manually specify weights might be a good fallback to have on the table.

from rayon.

nikomatsakis avatar nikomatsakis commented on August 15, 2024

See https://github.com/nikomatsakis/rayon/pull/12, which adds a weight combinator

from rayon.

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.