Skip to content

Should cpu fallback be run in parallel? #140

@jefffriesen

Description

@jefffriesen

When the gpu.js cannot run on a gpu and it falls back to cpu, I think it is single-threaded (if parallel, that would be awesome).

Have you considered using a cpu parallelization library like https://github.com/MichaReiser/parallel.es when the cpu is used? In theory, it would decrease the cpu time and make the performance gap between cpu and gpu closer. That's helpful for users of this library so they can creates a more reliable user experience. It makes using this library even more compelling.

For small arrays and simple computations, there may be a high overhead with with parallelizing the cpu. But I'm not sure why people would go through the trouble to write small, simple functions with gpu.js other than testing and experimenting. So large, complex functions that do well with parallelization seems to me like a reasonable target for this library.

There are several parallelization libraries, but Parallel.es is modern and very well thought out.

Do you think this is a good idea, bad idea or even practical to implement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions