[Vm-dev] CogVM performance

Eliot Miranda eliot.miranda at gmail.com
Wed May 20 18:46:04 UTC 2015


Henrik, Levente, David,

    thank you so much for this.  Henrik, indeed it is the XCHG instruction
that slows things down.  Here's a rough before and after measure, a huge
difference!

----QUIT----{15 May 2015 . 8:46:55 am} trunk4.6.image priorSource: 21959994
(1 to: 10) do: [:i| Transcript cr; print: 0 tinyBenchmarks; flush]
'225948808 bytecodes/sec; 15841140 sends/sec'
'226749335 bytecodes/sec; 16492340 sends/sec'
'247821878 bytecodes/sec; 16536674 sends/sec'
'239252336 bytecodes/sec; 18218093 sends/sec'
'279628618 bytecodes/sec; 17426750 sends/sec'
'249269717 bytecodes/sec; 17848093 sends/sec'
'254220456 bytecodes/sec; 16581247 sends/sec'
'270184696 bytecodes/sec; 18146439 sends/sec'
'233576642 bytecodes/sec; 17056311 sends/sec'
'230008984 bytecodes/sec; 17848093 sends/sec'
----QUIT----{20 May 2015 . 10:27:31 am} trunk4.6.image priorSource: 21960768
'612074118 bytecodes/sec; 92940463 sends/sec'
'614277144 bytecodes/sec; 89647038 sends/sec'
'634448574 bytecodes/sec; 88517824 sends/sec'
'632098765 bytecodes/sec; 93145781 sends/sec'
'638006230 bytecodes/sec; 85932045 sends/sec'
'632098765 bytecodes/sec; 91660848 sends/sec'
'641604010 bytecodes/sec; 93145781 sends/sec'
'623250152 bytecodes/sec; 91132543 sends/sec'
'636815920 bytecodes/sec; 92195314 sends/sec'
'589522164 bytecodes/sec; 80877219 sends/sec'

On Wed, May 20, 2015 at 5:41 AM, Henrik Johansen <
henrik.s.johansen at veloxit.no> wrote:

>
> Could it be related to the change in 1166 to use XCHG between register/mem
> locations instead of a MOV to a (now unavailable) temp register in
> genPushRegisterArgsForNumArgs:?
> According to http://www.agner.org/optimize/instruction_tables.pdf , XCHG
> with m/r operands has major penalties on most platforms compared to m/r
> MOV, which would be a problem if it's used for a large percent of sends...
>
> Cheers,
> Henry
>
> On 20 May 2015, at 3:07 , David T. Lewis <lewis at mail.msen.com> wrote:
>
>
> The generated source files have a comment block that indicate the VMMaker
> sources from which they were generated. The SVN 3306 src files came from
> VMMaker.oscog-eem.1155, and the SVN 3308 src files were generated from
> VMMaker.oscog-eem.1178. The changes that produce the performances
> difference
> will be found somewhere in the VMMaker commits it that range.
>
> Dave
>
>
> On Tue, May 19, 2015 at 10:40:15PM +0200, Levente Uzonyi wrote:
>
>
> And after that I checked out 3308 of src, and rebuilt the VM again:
>
> '934306569 bytecodes/sec; 46368169 sends/sec'
>
> The files which were changed from 3306 to 3308 are:
>
> U    src/vm/cointerp.c
> U    src/vm/cointerpmt.c
> U    src/vm/cogit.c
> U    src/vm/cointerp.h
> U    src/vm/gcc3x-cointerp.c
> U    src/vm/cointerpmt.h
> U    src/vm/gcc3x-cointerpmt.c
> U    src/vm/cogit.h
> U    src/plugins/QuicktimePlugin/QuicktimePlugin.c
>
> Levente
>
> On Tue, 19 May 2015, Levente Uzonyi wrote:
>
>
> The difference is somewhere in the sources. I just checked out revision
> 3306 of the src directory, and rebuilt a CogVM (ht one, and kept the
> platform files at 3345. I used some extra CFLAGS which are responsible for
> the higher bytecodes/sec, ignore that.). It gives the following:
>
> '941176470 bytecodes/sec; 122927085 sends/sec'
>
> While 3343 gives:
>
> '896672504 bytecodes/sec; 46102703 sends/sec'
>
> Levente
>
>
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150520/a83a7ddd/attachment-0001.htm


More information about the Vm-dev mailing list