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


On 06/20/2012 10:22 PM, Caolán McNamara wrote:
I wonder if there would be any actual measurable performance benefit to
sticking in some hackery to keep the rtl_str_getLength symbol for
backwards compatibility but alias/define rtl_str_getLength to strlen in
order to get any benefit of those optimized strlens.

My gut assumption is that it wouldn't make too much of a difference in practice. (Do we have large amounts of calls to rtl_str_getLength to begin with?)

And it would shoot down the valgrind workaround.  ;)

> Or do they only
kick in if the compiler can determine locally that the argument comes
from malloc ? dunno.

The actual optimization is likely (only) to read in complete words rather than individual bytes, which can be applied independently of the provenance of the argument. (In fact, a compiler could even automatically optimize the implementation of rtl_str_getLength in that way.)

Stephan

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.