proposal-ecmascript-sharedmem
proposal-ecmascript-sharedmem copied to clipboard
Performance tutorial
I'd like a section, maybe PERFORMANCE.md or in DISCUSSION.md, which explains the performance goals of this spec, and open areas which can help bridge the gap with native.
It'll be useful to evaluate the design, and point developers who have existing code so they can understand what performance to expect from:
- The current spec.
- Future revisions.
- Executing SAB code on different platforms.
For example:
- Hazard Pointer or RCU won't perform well on weak order machines, but neither will they with C++ consume.
- seqlock will likely have suboptimal behavior.
- Acquire/release operations are missing (affecting e.g. mutex), but should be readily available in the future.
This can't be exhaustive, but would be useful in developing benchmarks for SAB, and helping developers try it out (especially, setting expectations).
OK, good point. Some of what you're suggesting is out of scope for DISCUSSION.md (certainly "future work" would be completely speculative and does not belong there) but these points could be made:
- cost of seq_cst atomics
- why no acquire/release or relaxed
If you want to contribute a PERFORMANCE.md document that goes beyond that I'm happy to accept it.
I beefed up DISCUSSION.md, leaving the bug open in case anyone feels called to provide a performance tutorial.
Great start, ty. I may take a stab at more later.