snail-map-reduce 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MapReduceLinearMatrixProduct.rb +1 -2
- data/MapReduceMatrixProduct.rb +2 -11
- data/snail.gemspec +1 -1
- metadata +1 -1
data/MapReduceMatrixProduct.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require '
|
2
|
+
require 'matrix'
|
3
3
|
require './matrix_block_mixin'
|
4
4
|
require './map_reduce'
|
5
5
|
require 'benchmark'
|
@@ -75,15 +75,6 @@ reductions.times do
|
|
75
75
|
operations << Reducer.new {|k,v| block_join_reduce(k,v)}
|
76
76
|
end
|
77
77
|
|
78
|
-
result = []
|
79
|
-
mr_time = Benchmark.measure do
|
80
|
-
result = MapReduceRunner.new(operations).run([{:key => "X", :value => {:a => m1, :b => m2}}])
|
81
|
-
end
|
82
|
-
plain_time = Benchmark.measure do
|
83
|
-
m1*m2
|
84
|
-
end
|
85
|
-
puts "Unthreaded time = #{plain_time}"
|
86
|
-
puts "MR time = #{mr_time}"
|
87
|
-
|
78
|
+
result = MapReduceRunner.new(operations).run([{:key => "X", :value => {:a => m1, :b => m2}}])
|
88
79
|
puts m1*m2 == result[0][:value][:matrix]
|
89
80
|
|
data/snail.gemspec
CHANGED