Macaulay2 / Macaulay2/M2

applyKeys, applyValues, etc. can be parallelized

Open
#3,958 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Interpreter threads
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

`scan`, `apply` etc. can't be parallelized by default because users usually depend on the order. However, keys in a hash table don't have a canonical order, so it should be safe to automatically parallelize `applyKeys`, etc.

It's possible when the keys are integers that there's an implicit dependence, but those should be considered bugs.

The other risk is that whatever is being run may have other non-concurrent side effects, so maybe there should be a way to make it not parallel (maybe simply `apply(keys ...)` instead?)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the applyKeys and applyValues entry points and reviewing how they differ from scan and apply. Clarify the intended parallelization semantics, handling of implicit ordering and side effects, and the opt-out mechanism; done means the behavior and compatibility choice are agreed and implemented.

Written by the indexing model from the issue text.

Assessment

Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.