Skip to content

Commit 04d8887

Browse files
committed
Tweak bench label
1 parent 5fd40d5 commit 04d8887

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

_benchmark/tarai.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,25 @@ def tarai(x, y, z) =
2929
system("go version", exception: true)
3030

3131
Benchmark.ips do |x|
32-
# sequential version
33-
x.report("sequential"){ 4.times{ tarai(14, 7, 0) } }
32+
# Ruby: sequential version
33+
x.report("Ruby: sequential"){ 4.times{ tarai(14, 7, 0) } }
3434

35-
# parallel version (with Ractor)
36-
x.report("parallel (Ractor)"){
35+
# Ruby: parallel version (with Ractor)
36+
x.report("Ruby: Ractor"){
3737
4.times.map do
3838
Ractor.new { tarai(14, 7, 0) }
3939
end.each(&:take)
4040
}
4141

42-
# parallel version (with Fiber)
43-
x.report("parallel (Fiber)"){
42+
# Ruby: parallel version (with Fiber)
43+
x.report("Ruby: Fiber"){
4444
4.times.map do
4545
Fiber.new { tarai(14, 7, 0) }
4646
end.each(&:resume)
4747
}
4848

49-
# parallel version (with goroutine)
50-
x.report("parallel (goroutine)"){ Example::Benchmark.tarai_goroutine(14, 7, 0, 4) }
49+
# Go: parallel version (with goroutine)
50+
x.report("Go: goroutine"){ Example::Benchmark.tarai_goroutine(14, 7, 0, 4) }
5151

5252
x.compare!
5353
end

0 commit comments

Comments
 (0)