proposal-ecmascript-sharedmem icon indicating copy to clipboard operation
proposal-ecmascript-sharedmem copied to clipboard

Performance tutorial

Open jfbastien opened this issue 9 years ago • 3 comments
trafficstars

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:

  1. The current spec.
  2. Future revisions.
  3. 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).

jfbastien avatar Jul 22 '16 01:07 jfbastien

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.

lars-t-hansen avatar Jul 22 '16 05:07 lars-t-hansen

I beefed up DISCUSSION.md, leaving the bug open in case anyone feels called to provide a performance tutorial.

lars-t-hansen avatar Jul 22 '16 07:07 lars-t-hansen

Great start, ty. I may take a stab at more later.

jfbastien avatar Jul 22 '16 18:07 jfbastien