On 29/12/2012 19:31, Markus Mohrhard wrote:
Hey,
In function lcl_GetMergeRange sc/source/core/data/fillinfo.cxx, what's the
use to process "bHOver" variable in while (bVOver) ?
It is unused. Just copy pasted code from the bHOver case.
Ok, here's the change:
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=26a0979711f89915508359a9804765d934631ec2
I thought about these too:
- declaring nOverlap before the 2 loops, it would avoid to declare it each
time in the else of both loops.
- bVOver treatment is useless in first loop, only last loop is relevant
Please don't. These two steps fall under micro-optimization. A
compiler is in the end much better in optimizing the code than we can
do manually so unless profiling shows that we have a performance
problem we should write clean and easy code.
Variables should be defined as late as possible and trying to optimise
bVOver will make the code much more complicated for most likely no
measurable gain. If you really want to improve the performance the
right way is to take a slow operation and use callgrind to get an idea
where to optimise at much higher level than these assignments.
Ok then
Thank you Markus for your support!
Julien
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.