diff --git a/benchmark3.html b/benchmark3.html new file mode 100644 index 0000000..c0021f6 --- /dev/null +++ b/benchmark3.html @@ -0,0 +1,196 @@ + + + + +Numeric Javascript: Benchmarks + + + + +We are now running a linear algebra performance benchmark in your browser! Please ensure that your seatbelt +is fastened and your tray table is upright while we invert 100x100 matrices.

+ +Performance (MFLOPS) +
+
+
+
+
Geometric mean of scores:

+ +Higher is better: For each benchmark and library, a function is called repeatedly for a certain amount of time. +The number of function calls per seconds is converted into a FLOP rate. As we move right within each test, the matrix size increases.

+ +What tricks are used to increase performance in Numeric? + +
+ +GC pauses? +If you reload the page, the benchmark will run again and will give slightly different results. +This could be due to GC pauses or other background tasks, DOM updates, etc... +To get an idea of the impact of this, load this page in two or more different tabs (not at the same time, +one after the other) and switch between the tabs and see the differences in the performance chart. +


+ +
+ + + + + + + + +


+ diff --git a/src/iterative.js b/src/iterative.js new file mode 100644 index 0000000..5b5f955 --- /dev/null +++ b/src/iterative.js @@ -0,0 +1,380 @@ +// CCS matrix mul dense vector +numeric.ccsMV = numeric.ccsMV || function ccsMV(A, x) { + var Ai = A[0], Aj = A[1], Av = A[2]; + var sA = numeric.ccsDim(A); + var m = sA[0], n = sA[1]; + var L = x.length; + var ret = numeric.rep([L],0); + if( n !== L ) throw 'Matrix dimension does not match input vector.'; + var i, j, k, j0, j1; + var ri, val; + for(k=0;k!==n;k++) { + j0 = Ai[k]; + j1 = Ai[k+1]; + for(j=j0;j