Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 8 Apr 2015 15:10:51 -0400
From: John Mudd <johnbmudd@...il.com>
To: musl <musl@...ts.openwall.com>, John Mudd <johnbmudd@...il.com>
Subject: Re: musl perf, 20% slower than native build?

Here's a fresh native compile of the same version of Python, same gcc. Now
the musl version is only slightly slower, maybe 5%. BTW, I'm not
complaining. I use musl for portability, not speed.

$ python
Python 2.7.9 (default, Apr  8 2015, 14:29:14)
[GCC 4.8.2] on linux2
>>>

$ perf stat ~/multicorn_ctree/spitfire_bigtable.py
StringIO                                      523.62 ms
cStringIO                                     144.32 ms
list concat                                    55.12 ms

 Performance counter stats for
'/home/mudd/multicorn_ctree/spitfire_bigtable.py':

        769.874633 task-clock (msec)         #    0.977 CPUs utilized
               269 context-switches          #    0.349 K/sec
                 6 cpu-migrations            #    0.008 K/sec
             5,997 page-faults               #    0.008 M/sec
     2,043,153,669 cycles                    #    2.654 GHz
    [50.74%]
   <not supported> stalled-cycles-frontend
   <not supported> stalled-cycles-backend
     2,993,940,382 instructions              #    1.47  insns per cycle
    [75.11%]
       673,064,696 branches                  #  874.252 M/sec
    [74.59%]
        15,486,299 branch-misses             #    2.30% of all branches
    [74.71%]

       0.787704322 seconds time elapsed
$


Here's output from perf record/report for libc. This looks consistent with
the 5% longer run time.

native:
     2.20%   python  libc-2.19.so         [.] __memcpy_ssse3
     0.85%   python  libc-2.19.so         [.] __x86.get_pc_thunk.bx
     0.72%   python  libc-2.19.so         [.] _int_malloc
     0.56%   python  libc-2.19.so         [.] __memset_sse2
     0.47%   python  libc-2.19.so         [.] _int_free
     0.38%   python  libc-2.19.so         [.] malloc
     0.25%   python  libc-2.19.so         [.] realloc
     0.25%   python  libc-2.19.so         [.] __ctype_b_loc
     0.10%   python  libc-2.19.so         [.] free
     0.04%   python  libc-2.19.so         [.] __strchr_sse2_bsf
     0.03%   python  libc-2.19.so         [.] __memcpy_ia32
     0.03%   python  libc-2.19.so         [.] __sbrk
     0.03%   python  libc-2.19.so         [.] vfprintf
     0.03%   python  libc-2.19.so         [.] mremap_chunk
     0.03%   python  libc-2.19.so         [.] __strncpy_ssse3
     0.03%   python  libc-2.19.so         [.] __strlen_sse2_bsf
     0.03%   python  libc-2.19.so         [.] __x86.get_pc_thunk.cx

musl:
     4.74%   python  libc.so              [.] memcpy
     2.05%   python  libc.so              [.] free
     1.17%   python  libc.so              [.] malloc
     1.05%   python  libc.so              [.] unbin
     0.90%   python  libc.so              [.] a_and_64
     0.81%   python  libc.so              [.] a_or_64
     0.68%   python  libc.so              [.] memset
     0.31%   python  libc.so              [.] bin_index_up
     0.22%   python  libc.so              [.] bin_index
     0.22%   python  libc.so              [.] a_ctz_64
     0.16%   python  libc.so              [.] realloc
     0.16%   python  libc.so              [.] __x86.get_pc_thunk.bx
     0.14%   python  libc.so              [.] strlen
     0.12%   python  libc.so              [.] trim
     0.12%   python  libc.so              [.] strcmp
     0.09%   python  libc.so              [.] adjust_size
     0.06%   python  libc.so              [.] __strerror_l
     0.06%   python  libc.so              [.] __stpncpy
     0.03%   python  libc.so              [.] first_set
     0.03%   python  libc.so              [.] .L80
     0.03%   python  libc.so              [.] remap_rel
     0.03%   python  libc.so              [.] find_sym
     0.03%   python  libc.so              [.] sysv_hash
     0.03%   python  libc.so              [.] fclose
     0.03%   python  libc.so              [.] do_relocs
     0.03%   python  libc.so              [.] __aio_close
     0.03%   python  libc.so              [.] sysv_lookup




On Wed, Apr 8, 2015 at 12:05 PM, Szabolcs Nagy <nsz@...t70.net> wrote:

> 20% is tiny measurement noise compared to the huge
> variance in the environments you are comparing
>
>

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.