Sparse matrix-vector multiplication
function nest(p, mlen) = let vector(seg,vals) = p; (seg1,seg2) = mlen in vector(seg1,vector(seg2,vals)); function MxV(Mval, Midx, Mlen, Vect) = let v = Vect -> Midx; p = {a * b: a in Mval; b in v} in {sum(row) : row in nest(p, Mlen)};For the sparse matrix-vector multiplication benchmarks, every row in the matrix had a length of 5 and the matrix values were random floating-point data.