Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This one is a bit counter-intuitive.
Before/after:
Limited to 4 efficiency cores before/after:
So you might be wondering, why on Earth would I send a PR that makes things slower?
2 parallel benches before/after:
4 parallel benches before/after:
As you can see, old code is significantly slower with concurrency 2 or 4, new version improves performance down to 85ms per table when 4 tables are constructed concurrently. This is because updated implementation is doing strictly less work for each table, such that when other tables are processed concurrently they have more resources available to them, but every individual table generation is a bit slower.
With the performance level achieved already for single table creation scalability that improves plotting speeds seems much more important.
I plan to submit changes later that will increase default concurrency on farmer to take advantage of these improvements and maybe introduce optimizations of similar nature (and hopefully supranational/blst#203) to push plotting performance further than it ever was. It should also help to further reduce replotting impact on normal usage of the computer.
Please let me know if you think this tradeoff is not worth it or have any other concerns.
P.S. As a bonus parallel PoSpace is now supported in no-std environment, not that I expect anyone to take advantage of that 🙃
Code contributor checklist: