New Tiled Data Manager ideas and tests

Dmitry Kazakov dimula73 at gmail.com
Tue Jun 2 18:46:45 CEST 2009


On Tue, Jun 2, 2009 at 7:51 PM, Bart Coppens <kde at bartcoppens.be> wrote:

> On Tuesday 02 June 2009 17:25:58 Dmitry Kazakov wrote:
> > New commit r976769
> (For reference:
>
> http://websvn.kde.org/branches/work/koffice-intentivelyfeature-tiles-ng/krita/image/tiles3/kis_tile_processors.cc?r1=976769&r2=976768&pathrev=976769<http://websvn.kde.org/branches/work/koffice-feature-tiles-ng/krita/image/tiles3/kis_tile_processors.cc?r1=976769&r2=976768&pathrev=976769>
> )
>
> > A strange thing! I changed only one line and processors started working
> 20%
> > faster than old system. I don't know why. Could someone take a look.
> Well it is probably because you change the meaning of the variable. In the
> old
> version (const qint32 dataIdx), your variable is constant across the
> duration
> of the function. In the new version, (static const qint32 dataIdx) the
> variabe is constant for _all_ invocations of the function (after the first
> one).
>


Well... Thanks... I know about storage classes =) And i purposely added
'static' class to ensure that indexFromPoint(m_dataLeftTop, m_dataStride) is
called only once while creating processor-object.
The thing i can't understand is how 1multiplication+1addition could cause
such a great overhead (0.560sec instead of 0.900sec)?!
And more than that, why callgrind causes optimized version to slow down
again?

Here are three outputs in attachments.



-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20090602/157a6f12/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out_before_commit
Type: application/octet-stream
Size: 1350 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20090602/157a6f12/attachment.dll 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out_after_commit
Type: application/octet-stream
Size: 1782 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20090602/157a6f12/attachment-0001.dll 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out_after_commit_under_callgrind
Type: application/octet-stream
Size: 1830 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20090602/157a6f12/attachment-0002.dll 


More information about the kimageshop mailing list