From c927af60edbf7dd859fc8057151e40b0fe2de661 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 30 Nov 2016 17:59:13 +0100 Subject: Fix a performance regression in (mat*mat)*vec for which mat*mat was evaluated multiple times. --- test/product_notemporary.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/product_notemporary.cpp') diff --git a/test/product_notemporary.cpp b/test/product_notemporary.cpp index 2bb19a681..8bf71b4f2 100644 --- a/test/product_notemporary.cpp +++ b/test/product_notemporary.cpp @@ -136,6 +136,10 @@ template void product_notemporary(const MatrixType& m) VERIFY_EVALUATION_COUNT( rm3.noalias() -= (cv1) * (rv1 * m1), 1 ); VERIFY_EVALUATION_COUNT( rm3.noalias() = (m1*cv1) * (rv1 * m1), 2 ); VERIFY_EVALUATION_COUNT( rm3.noalias() += (m1*cv1) * (rv1 * m1), 2 ); + + // Check nested products + VERIFY_EVALUATION_COUNT( cvres.noalias() = m1.adjoint() * m1 * cv1, 1 ); + VERIFY_EVALUATION_COUNT( rvres.noalias() = rv1 * (m1 * m2.adjoint()), 1 ); } void test_product_notemporary() -- cgit v1.2.3