Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 07/23/2012 05:04 AM, Lubos Lunak wrote:

  Where's the benchmark for that? I'd like to see what difference it makes, but
I cannot find anything in the blog post.

Good question. I didn't put benchmark data in because I wanted to first get the background story out first, which I knew was going to be somewhat long. I'll do another blog post just for benchmarks, and for other performance considerations.

Having said that, I have _some_ numbers to share. While I can't really test the real spreadsheet storage benchmark since doing that would require we actually put this structure into ScColumn for real), we can simulate it by using the former matrix backend container mixed_type_matrix, and compare it to multi_type_matrix which uses multi_type_vector as its backend storage. mixed_type_matrix also had its elements allocated on the heap and their memory locations stored in its primary array, so it had the same weakness as the current cell storage model in ScColumn.

Here are the numbers. The test scenario is to 1) create a 100,000 by 1,000 matrix instance and fill it with numeric values, and 2) iterate through all its elements and calculate their total. The results are:

mixed_type_matrix:
1) 0.887776 sec
2) 1.96097 sec

multi_type_matrix:
1) 0.819243 sec
2) 0.364899 sec

The instantiation and insertion performance is only slightly faster, but element iteration performance is noticeably faster with multi_type_matrix.

The test code was compiled with g++ with only -Os flag. I haven't tested it with any other optimization flags that gcc provides.

Best,

Kohei

--
Kohei Yoshida, LibreOffice hacker, Calc



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.