This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/21905] snprintf is terribly slow when copying strings


https://sourceware.org/bugzilla/show_bug.cgi?id=21905

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg
         Resolution|---                         |OBSOLETE

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
The performance discrepancy does not show on master:

$ ./testcase-glibc-master 
Run on (8 X 4400 MHz CPU s)
2017-08-28 12:49:33
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may
be noisy and will incur extra overhead.
---------------------------------------------------------
Benchmark                  Time           CPU Iterations
---------------------------------------------------------
BM_snprintf/10            43 ns         43 ns   16208239
BM_snprintf/100           44 ns         44 ns   15657047
BM_snprintf/1000          61 ns         61 ns   10386363
BM_snprintf/10000        244 ns        244 ns    3079929

I also does not show neither on 2.26 or 2.24, I only saw on 2.24. I can't
really pinpoint the exact commits that actually change this behavior, but I
take it fixed upstream.

As a side note, for future performance regression or enhancement please verify
against *master* branch, not on older releases (GLIBC 2.17 is five years old
and its branch is closed for backports [1]). Also, avoid running such benchmark
tests again distro releases since they usually incorporate backports and non
upstream patches.

[1] https://sourceware.org/glibc/wiki/Release

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]