JuliaSIMD / JuliaSIMD/Polyester.jl

`@batch` slower than `Threads.@threads`

Open
#32 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
285
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Tried to see if replacing `Threads.@threads` with `@batch` would improve performance on smaller workloads for a function. This seems to introduce some kind of data race (which wasn't present with `Threads.@threads`), which results in many `NaN` values and incorrect results, which were caught by the tests. The relevant loop is [here](https://github.com/ParadaCarleton/ParetoSmooth.jl/blob/main/src/ImportanceSampling.jl#L69). Not sure what the cause is; the `for` loop is looping over calculations for each data point, and each one of these should be completely independent of the calculations for every other data point.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.