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


Hi Michael,

On October 29, 2015 at 10:21 AM Michael Meeks <michael.meeks@collabora.com>
wrote:


Hi Kohei,

      I'd love some input (if you have a minute) on the attached. The
punch-line is, that if we want to do really fast arithmetic, we start to
need to do some odd things; while I suspect that this piece of unrolling
can be done with the iterator

So, if I'm not mistaken of your intent, you can just do

const double* p = &sc::numeric_block::at(*rNode.data, nOffset);

to have direct access to the double array at specified offset, without needing
to do a weird hack like that.

 - the next step I'm poking at (SSE3
assembler ;-) is not going to like that.

What kind of data access do you need to achieve that, or would the above
approach be sufficient?


      The win from this on a sum heavy sheet calculation is from 14.4s
seconds to recalculate to 9s (actually testing using the
'puncture_mdds_encap' approach ;-) - a 35%+ speedup.

This is a good chunk of speedup indeed. :-)


      I guess, what I'd most like is a:

      'const double *getDoubles(size_t nAtOffset);

      Or somesuch =) or, failing that - a chunked double iterator that would
give a pointer and size (reflecting the underlying chunks but giving
some freedom there).

So, the above at(*data, offset) method can be used to get a pointer to the
underlying array.  The size of the entire array is already stored with
rNode.size. Additionally, if you ever need to get the logical position of the
head of the array, it is stored with rNode.position.

I *hope* this is all you'll need?  If not, let me know and I'll be happy to give
you a help.

Kohei

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.