Separating benchmarks with different complexity and benchmarks with just variants
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ài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- ruby
- Lĩnh vực
- documentation, performance
Hướng nghiên cứu
Bắt đầu bằng việc xem xét các ví dụ benchmark của repository, bao gồm ví dụ được liên kết về Array#bsearch so với Array#find, và so sánh kết quả CRuby với các benchmark TruffleRuby được tham chiếu. Phần hoàn thiện cần tách các kết quả do độ phức tạp chi phối khỏi các biến thể nhạy cảm với cách triển khai và thêm các điểm cần lưu ý được đề xuất, nhưng issue không xác định các tệp hoặc test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello there,
I think it would be worthwhile to separate the example in two categories:
- Benchmarks which are faster due to the variants having different complexity (for example, https://github.com/JuanitoFatas/fast-ruby#arraybsearch-vs-arrayfind-code). Those I believe will remain with a clear advantage for one of the variants for a long time.
- Other benchmarks, where the difference is minimal, and highly relies on the specific Ruby implementation and version, and where the slow and fast variants might switch regularly.
I think the second category deserves a clear warning that those results were measured on some version of CRuby and might not apply anymore, and likely do not apply to other Ruby implementations.
For fun, @gogainda ran these benchmarks on TruffleRuby at https://github.com/gogainda/fast-truffleruby
What I can see from a quick look is many of the differences on MRI don't exist on TruffleRuby (e.g., Sequential vs Parallel Assignment).
Also, many of these micro benchmarks optimize away (>1 billion i/s), i.e., in other words doing that operation alone costs basically nothing or like <10 cycles, which I interpret as a useful word of caution against microbenchmarks which might test something real code wouldn't, and might show differences that don't matter in practice.
I'd recommend in general to benchmark in the setup of your app/program, on the machine where the performance will matter. For example, a variant might give be 25% faster in a microbenchmark, but yield a 0% speedup on the full app and therefore be of limited value.
- Ngôn ngữ chính
- Ruby
- Star
- 5.7k
- Fork
- 370
- 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 fastruby/fast-ruby
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 52/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Tất cả issue của fastruby/fast-ruby
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
simp/pupmod-simp-simp#395 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
simp/pupmod-simp-rsyslog#219 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
simp/pupmod-simp-pupmod#256 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
simp/pupmod-simp-sudo#150 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100