Consider optimizations for heavily-nested scenarios
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- wasm
- Lĩnh vực
- compilers, performance
Hướng nghiên cứu
Start with the Phase 3 proposal material and the heavily nested generator and green-thread workload described in this issue. Measure the O(N) switching behavior when generator nesting is large, then review the results with the proposal group. Done means the group has agreed on a predictable optimization or proposal adjustment and documented it before the feature is considered finished.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Once this proposal gets to Phase 3 and we can study the performance of realistic workloads, I think it's important for this group to measure a workload that, e.g., uses stack-switching for both generators with green-threading where there are stacks of the form:
| green-thread-handler | generator-handler 0 | ... | generator-handler N | suspend to green-thread-handler |
Because generator nesting depth is controlled by the user program, this N can be arbitrarily-large (e.g., generators can be called recursively) and a naive implementation will require an O(N) search when switching between green threads.
Assuming that the cost of this O(N) search isn't somehow amortized away, it seems like we should work out a predictable optimization that engines can perform so that, in practice, suspension to the green-thread-handler is O(1) (like a native engine would do). Although optimizing the O(N) case in general doesn't seem possible, identifying a subset of cases that cover the above scenario does seem imminently possible. However, I think it's important for us to have a proper shared discussion about what this predictable optimization is before declaring this feature finished so that (1) we can publish it in some form and continue to claim that wasm has predictable performance, (2) if there is some small tweak or addition to the proposal that would make the optimization significantly simpler or more effective, we still have the opportunity to make that tweak.
- Ngôn ngữ chính
- WebAssembly
- Star
- 216
- Fork
- 19
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của WebAssembly/stack-switching
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
WebAssembly/stack-switching#156 · 1 bình luận ·
-
Should `cont.new` be constant? Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
WebAssembly/stack-switching#145 · 4 bình luận ·
-
Use `typeuse` in text format? Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
WebAssembly/stack-switching#144 · 4 bình luận ·
-
JSPI integration Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
WebAssembly/stack-switching#131 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
WebAssembly/stack-switching#128 · 6 bình luận ·
Tất cả issue của WebAssembly/stack-switching
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
objectionary/eo#8923 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend Đang mởcoarray
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
internal.h中,漏掉了1个定义。 Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100