marmaduke 7 hours ago

That’s what I was wondering. Iiuc openmp uses work stealing and the spice readme talks about the inefficiency of that:

https://github.com/judofyr/spice?tab=readme-ov-file#work-ste...

so I’d be interested in seeing a benchmark.

  • marmaduke 7 hours ago

    Reading the implementation details kinda got me wanting to do a c11 threads based port.

  • bee_rider 7 hours ago

    Thanks. That’s some pretty clever stuff, with a nice intuitive description.

nestorD 12 hours ago

Rayon is known to have a higher overhead for the simple, and arguably most common case in numerical codes, static block size scheduling. Things get better, and you start to benefit from rayon, as work gets less balanced.

thayne 8 hours ago

Well, for one thing OpenMP is a c/c++ library, and chili and rayon are rust libraries.

It's probably possible to use openmp from rust, but the interface probably isn't as nice, you would need some kind of translation layer from rust closures and iterators to the OpenMP API

  • bee_rider 7 hours ago

    Plus Fortran!

    There’d definitely be some work translating Rust concepts over. It might be impossible/not worth it. But maybe it would be nice to have Rust, C, and Fortran all talking to the same runtime?