Skip to content

Instantly share code, notes, and snippets.

View tomtau's full-sized avatar

Tomas Tauber tomtau

View GitHub Profile
@tomtau
tomtau / Graph propagation (common subtrees)
Created September 5, 2013 15:00
Generated job using the old Matrix API
import com.twitter.scalding._
import com.twitter.scalding.mathematics.Matrix
class BenchOldJob(args : Args) extends Job(args) {
import Matrix._
val a0 = Tsv("/home/ttauber/scalding-bench/a0.tsv", ('x, 'y, 'v) )
.read.
toMatrix[Int,Int,Double]('x,'y,'v)
(a0 * a0 * a0 * a0 * a0 * a0 * a0 * a0).write( Tsv("/home/ttauber/scalding-bench/aold.tsv"))
@tomtau
tomtau / (A*B) + C benchmark
Created September 5, 2013 14:56
Generated job using the new Matrix API
import com.twitter.scalding._
import cascading.pipe.joiner._
import com.twitter.scalding.mathematics.Matrix2
import com.twitter.scalding.mathematics.FiniteHint
import com.twitter.algebird.Group
class BenchNewJob(args : Args) extends Job(args) {
import Matrix2._
import com.twitter.scalding.mathematics.MatrixLiteral
@tomtau
tomtau / (A*B) + C benchmark
Created September 5, 2013 14:54
Generated job using the old Matrix API
import com.twitter.scalding._
import com.twitter.scalding.mathematics.Matrix
class BenchOldJob(args : Args) extends Job(args) {
import Matrix._
val a0 = Tsv("/home/ttauber/scalding-bench/a0.tsv", ('x, 'y, 'v) )
.read.
toMatrix[Int,Int,Double]('x,'y,'v)