Coder Social home page Coder Social logo

Benchmark suite about rayon HOT 11 OPEN

rayon-rs avatar rayon-rs commented on July 18, 2024
Benchmark suite

from rayon.

Comments (11)

willi-kappler avatar willi-kappler commented on July 18, 2024

I think mandel-rust v0.4 should be ready for this (will be released soon). I plan to do some clean up and add script-collectable output. Should I remove the other crates and just leave Rayon for the benchmark suite?

Matklad wrote a raytracer in Rust which could be added.
Maybe also audio en-/decoder (ogg, flac) and compression / decompression algorithms. IIRC I saw some of them written in 100% Rust.

There should always be a way to verify (automatically) that the results are correct (compare images, compressed files, etc.).

from rayon.

nikomatsakis avatar nikomatsakis commented on July 18, 2024

@willi-kappler

I think mandel-rust v0.4 should be ready for this (will be released soon). I plan to do some clean up and add script-collectable output. Should I remove the other crates and just leave Rayon for the benchmark suite?

If you could prepare a kind of stripped down version to include as a benchmark/demo, that'd be great.

Matklad wrote a raytracer in Rust which could be added. Maybe also audio en-/decoder (ogg, flac) and compression / decompression algorithms. IIRC I saw some of them written in 100% Rust.

Good ideas. The raytracer should be imminently actionable.

There should always be a way to verify (automatically) that the results are correct (compare images, compressed files, etc.).

Yes. I need to add this to the nbody demo that I wrote, though I'm not quite sure how to do it. I mean I guess I can just hardcode some results. (I was considering running the original JS code for some time and comparing the results, as well.)

from rayon.

lilianmoraru avatar lilianmoraru commented on July 18, 2024

What I propose is for it to be data driven.
For example, to have JSON config files that indicate which tests to run, how many times, how to collect the script output(so you if you add another field at the output for example, you don't need to adapt the script but add it in that config file).
The script could expect some specific JSON file names at some specific locations that can overwrite some of the defaults(of course, the defaults are also in a predefined location).
It could have a hard requirement on jq and use it to parse the config files.
The script results could also probably be displayed in the JSON format so it can parsed by other tools or scripts.

For this to be started(I could do this but after a week), as a starting point, the output from the benchmarks should be predefined.

from rayon.

willi-kappler avatar willi-kappler commented on July 18, 2024

@lilianmoraru That sounds great!
The benchmarks should at least have the following output:

  • time taken (in ms ?)
  • result validation (true / false) (so the result should be validated inside the benchmark. All the data structures + functions are there. Alternatively the script could compare the result of each benchmark but this will make the script more complicated.).
  • options used ?

This output should be written to a file, probably also JSON.
Maybe s.th. like this: {"benchmark": {"timeTaken": 1234.56, "valid": true, "options": "--iter 1000 --no_img"}}

from rayon.

cuviper avatar cuviper commented on July 18, 2024

I'm pretty happy with the results of the prime sieve I just wrote -- want it as a demo?
https://users.rust-lang.org/t/how-to-make-this-parallel-prime-sieve-faster/4802/26

from rayon.

willi-kappler avatar willi-kappler commented on July 18, 2024

I've just read it on the rust user forum and was going to suggest it here ;-)

So: sure, that would be really nice, thanks!

I've been too busy the last couple of weeks with other stuff, but will finish up my mandelbrot demo for the benchmark suite.

from rayon.

nikomatsakis avatar nikomatsakis commented on July 18, 2024

@cuviper sounds good; and we should do another release so that par_chunks_mut is available

from rayon.

lilianmoraru avatar lilianmoraru commented on July 18, 2024

@nikomatsakis So do you think that would be a good way to go with script + jq(if the JSON configs is even the way to go)?
Or may be instead of jq to have it written in Rust?
My worry would be that jq is not available with every distro(or MSYS) or it is to old, that would mean that the script should download the dependency(site might be down), but it cannot rely on being able to install jq(user rights, MSYS?)...

Also, what's your opinion on moving neg-tests-*, pos-tests-* in a test(s) folder?

from rayon.

nikomatsakis avatar nikomatsakis commented on July 18, 2024

I'd be inclined to try and make something pure-rust, myself. Maybe we can just make a combined "demos" crate that can run all the benchmarks.

from rayon.

nikomatsakis avatar nikomatsakis commented on July 18, 2024

The main advantage of something pure rust is that it doesn't add any "extra" deps (we can manage everything through cargo) and hence will be trivial to run.

from rayon.

lilianmoraru avatar lilianmoraru commented on July 18, 2024

@nikomatsakis And what are your thoughts on the configuration and behavior to be defined in JSON config files? Or would you prefer it to be directly written in Rust?
What I was thinking: you can give the modified configuration file to somebody and "here, run with this".

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.