From 66607897a54b6f21f767e5e432c0a27f43a530c3 Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Wed, 20 Jan 2010 01:05:40 +0000 Subject: [PATCH] Added vector_scale timing benchmarks --- cpp/timeMatrix.cpp | 75 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git a/cpp/timeMatrix.cpp b/cpp/timeMatrix.cpp index 3ba3281d2..b24e9a5e8 100644 --- a/cpp/timeMatrix.cpp +++ b/cpp/timeMatrix.cpp @@ -14,8 +14,8 @@ using namespace gtsam; /* * Results: * Alex's Machine: - * - no pass: 0.1818 sec - * - pass : 0.1802 sec + * - no pass: 0.184 sec + * - pass : 0.181 sec */ double timeCollect(size_t p, size_t m, size_t n, bool passDims, size_t reps) { // create a large number of matrices @@ -54,6 +54,64 @@ double timeCollect(size_t p, size_t m, size_t n, bool passDims, size_t reps) { return elapsed/reps; } +/* + * Results: + * Alex's Machine: + * - Original: 0.60 sec (x1000) + */ +double timeVScaleColumn(size_t m, size_t n, size_t reps) { + // make a matrix to scale + Matrix M(m, n); + for (int i=0; i