
I added numeric solution of a simple differential equation to the benchmark.
output from 3 runs:
multiplying ublas::matrix<double>(1000, 1000) : 16.016 seconds multiplying ublas::matrix<quantity>(1000, 1000) : 16.453 seconds tiled_matrix_multiply<double>(1000, 1000) : 1.859 seconds tiled_matrix_multiply<quantity>(1000, 1000) : 1.843 seconds solving y' = 1 - x + 4 * y with double: 3.219 seconds solving y' = 1 - x + 4 * y with quantity: 2.656 seconds
multiplying ublas::matrix<double>(1000, 1000) : 16.281 seconds multiplying ublas::matrix<quantity>(1000, 1000) : 16.406 seconds tiled_matrix_multiply<double>(1000, 1000) : 1.906 seconds tiled_matrix_multiply<quantity>(1000, 1000) : 1.859 seconds solving y' = 1 - x + 4 * y with double: 3.281 seconds solving y' = 1 - x + 4 * y with quantity: 2.61 seconds
multiplying ublas::matrix<double>(1000, 1000) : 16.094 seconds multiplying ublas::matrix<quantity>(1000, 1000) : 16.516 seconds tiled_matrix_multiply<double>(1000, 1000) : 1.875 seconds tiled_matrix_multiply<quantity>(1000, 1000) : 1.859 seconds solving y' = 1 - x + 4 * y with double: 3.203 seconds solving y' = 1 - x + 4 * y with quantity: 2.672 seconds
Interesting - this definitely shows some of the pitfalls of simple performance testing. Here are my results : multiplying ublas::matrix<double>(1000, 1000) : 42.78 seconds multiplying ublas::matrix<quantity>(1000, 1000) : 42.31 seconds tiled_matrix_multiply<double>(1000, 1000) : 1.73 seconds tiled_matrix_multiply<quantity>(1000, 1000) : 2.05 seconds solving y' = 1 - x + 4 * y with double: 2.59 seconds solving y' = 1 - x + 4 * y with quantity: 2.57 seconds multiplying ublas::matrix<double>(1000, 1000) : 42.74 seconds multiplying ublas::matrix<quantity>(1000, 1000) : 42.43 seconds tiled_matrix_multiply<double>(1000, 1000) : 1.77 seconds tiled_matrix_multiply<quantity>(1000, 1000) : 2.08 seconds solving y' = 1 - x + 4 * y with double: 2.59 seconds solving y' = 1 - x + 4 * y with quantity: 2.59 seconds multiplying ublas::matrix<double>(1000, 1000) : 42.78 seconds multiplying ublas::matrix<quantity>(1000, 1000) : 42.31 seconds tiled_matrix_multiply<double>(1000, 1000) : 1.74 seconds tiled_matrix_multiply<quantity>(1000, 1000) : 2.06 seconds solving y' = 1 - x + 4 * y with double: 2.6 seconds solving y' = 1 - x + 4 * y with quantity: 2.57 seconds I'm not sure why my simple matrix multiplication results are so much slower...the others are comparable. In any case, the relative performance is obviously close enough to identical for non-HPC applications... I think the performance arguments look like red herrings... I'll put this in the sandbox example code. Matthias