Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Parallel clones for large data structures #78

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Conversation

winston-h-zhang
Copy link
Contributor

Further work from lurk-lab/lurk-beta#777.

This continues the story. pq observes that:

I now believe, based on informal observation, that the loading in mmap-fix is slower than generating fresh params.

The long loading times were due to two separate issues. The first is a bug (fixed in lurk-lab/lurk-beta#777), and the second is the lack of parallelization. This PR addresses the low hanging fruit by implementing parallel clones for the large data structures. We see ~2x speedup.

Before this PR:

bang!                                         24.328472s ├─────────────────────────────────────────────────────────────┤
  Instance::new                                535.148ms │
    <MultiFrame as StepCircuit>::synthesize     230.39ms  │
  read_abomonated                             15.416185s  ├──────────────────────────────────────┤
    decode                                       4.137ms  ┆
    clone                                     15.411941s  ├──────────────────────────────────────┤

After this PR:

bang!                                         18.039595s ├─────────────────────────────────────────────────────────────┤
  Instance::new                                530.639ms ├┤
    <MultiFrame as StepCircuit>::synthesize    233.376ms  │
  read_abomonated                              8.473104s   ├────────────────────────────┤
    decode                                         2.8ms   ┆
    clone                                      8.469151s   ├────────────────────────────┤

Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

@winston-h-zhang winston-h-zhang added this pull request to the merge queue Oct 23, 2023
Merged via the queue into dev with commit 8afd43f Oct 23, 2023
2 checks passed
@winston-h-zhang winston-h-zhang deleted the par_clone branch October 23, 2023 00:11
mpenciak pushed a commit to mpenciak/arecibo that referenced this pull request Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants