From 588c119bf35848188f4a538db4f0b74cc776922d Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Wed, 20 Jan 2010 18:52:31 +0000 Subject: [PATCH] Added timing script for Matrix::householder_() --- cpp/timeMatrix.cpp | 50 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/cpp/timeMatrix.cpp b/cpp/timeMatrix.cpp index afcd64996..23ea119e9 100644 --- a/cpp/timeMatrix.cpp +++ b/cpp/timeMatrix.cpp @@ -151,6 +151,48 @@ double timeColumn(size_t reps) { return elapsed; } +/* + * Results + * Alex's machine + * Baseline (no householder, just matrix copy) : 0.05 sec + * Initial : 8.20 sec + */ +double timeHouseholder(size_t reps) { + // create a matrix + Matrix Abase = Matrix_(4, 7, + -5, 0, 5, 0, 0, 0, -1, + 00, -5, 0, 5, 0, 0, 1.5, + 10, 0, 0, 0,-10, 0, 2, + 00, 10, 0, 0, 0,-10, -1); + + // perform timing + double elapsed; + { + boost::timer t; + for (size_t i=0; i