FAQ

On 2012/12/10 03:33:08, rsc wrote:
Sounds promising. Let me know when you've processed Daniel's
suggestions.


Here are some quick results from a dual core pandaboard, taking the best
of a few runs to eliminate disk io as much as possible (hopefully all
the source was cached, and $TMP is a tmpfs)

rev: 78ed3c237603
pandaboard(~/go/src) % time go build -a std

real 1m9.945s
user 1m52.859s
sys 0m19.148s

rev: 3c932286e5f5
pandaboard(~/go/src) % time go build -a std

real 1m3.129s
user 1m41.320s
sys 0m17.477s

rev: 7b9e9fc59eb5 + CL 6903059 patch set #3
pandaboard(~/go/src) % time go build -a std

real 0m59.224s
user 1m34.648s
sys 0m15.914s

18 seconds of user time saved !

The pandaboard has 1gb of ram, so swapping is not an issue on this
machine. As mal batches mallocs, malloc is virtually free in terms of
user CPU time. I attribute most of the performance improvements here to
less work by the kernel satisfying allocations, less memory footprint
(hopefully better cache utilisation) and less time spent in memclr.

https://codereview.appspot.com/6903059/

Search Discussions

  • Daniel Morsing at Dec 11, 2012 at 9:41 am

    On 2012/12/11 01:56:45, dfc wrote:
    The pandaboard has 1gb of ram, so swapping is not an issue on this
    machine. As
    mal batches mallocs, malloc is virtually free in terms of user CPU time. I
    attribute most of the performance improvements here to less work by
    the kernel
    satisfying allocations, less memory footprint (hopefully better cache
    utilisation) and less time spent in memclr.
    I think the reasons are much simpler. Previously, we were spending a lot
    of time reparsing imports sections. For a package like os where every
    file imports syscall, we were reading in 2000 lines of declarations for
    each file. All of that parsing takes time, not to mention all the
    queries to the symbol table.

    I'd be interested to see if there's a drop in system time with my fix.

    https://codereview.appspot.com/6903059/
  • Dave Cheney at Dec 11, 2012 at 11:33 am
    A sound explanation. I will retest once the next patch set lands.
    On 11/12/2012, at 20:41, daniel.morsing@gmail.com wrote:
    On 2012/12/11 01:56:45, dfc wrote:
    The pandaboard has 1gb of ram, so swapping is not an issue on this
    machine. As
    mal batches mallocs, malloc is virtually free in terms of user CPU time. I
    attribute most of the performance improvements here to less work by
    the kernel
    satisfying allocations, less memory footprint (hopefully better cache
    utilisation) and less time spent in memclr.
    I think the reasons are much simpler. Previously, we were spending a lot
    of time reparsing imports sections. For a package like os where every
    file imports syscall, we were reading in 2000 lines of declarations for
    each file. All of that parsing takes time, not to mention all the
    queries to the symbol table.

    I'd be interested to see if there's a drop in system time with my fix.

    https://codereview.appspot.com/6903059/
  • Remyoudompheng at Dec 11, 2012 at 10:00 pm
    Hello golang-dev@googlegroups.com, dave@cheney.net,
    daniel.morsing@gmail.com, rsc@golang.org (cc:
    golang-dev@googlegroups.com),

    Please take another look.


    https://codereview.appspot.com/6903059/
  • Daniel Morsing at Dec 11, 2012 at 10:26 pm
  • Dave at Dec 11, 2012 at 10:37 pm

    On 2012/12/11 22:00:16, remyoudompheng wrote:
    Hello mailto:golang-dev@googlegroups.com, mailto:dave@cheney.net,
    mailto:daniel.morsing@gmail.com,
    mailto:rsc@golang.org (cc: mailto:golang-dev@googlegroups.com),
    Please take another look.
    LGTM

    Best result at rev ec3ae5b98922 + patchset 4

    real 0m58.414s
    user 1m34.063s
    sys 0m15.328s

    Which is pretty much the same as the previous patchset in terms of
    performance. I think i'm probably at the limit of precision for this
    simple test.


    https://codereview.appspot.com/6903059/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 11, '12 at 1:56a
activeDec 11, '12 at 10:37p
posts6
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase