[m-dev.] enabling stseg component by default

Julien Fischer jfischer at opturion.com
Wed May 22 17:16:56 AEST 2013


On Wed, 22 May 2013, Peter Wang wrote:

> On Wed, 22 May 2013 12:34:14 +1000, Julien Fischer <jfischer at opturion.com> wrote:
>> On Wed, May 22, 2013 at 12:12 PM, Peter Wang <novalazy at gmail.com> wrote:
>>
>>> On Tue, 21 May 2013 17:14:22 +1000 (EST), Julien Fischer <
>>> jfischer at opturion.com> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I propose that we enable the stseg (stack segments) grade component
>>>> by default for all low-level C grades in the post 13.05 versions
>>>> of the compiler.
>>>>
>>>> Any objections?
>>>
>>> In addition to, or replacing non-stseg grades?
>>>
>>
>> Replacing non-stseg grades in the default grade set.  For example, on Linux
>> the default grades
>> would become:
>>
>>     asm_fast.gc.stseg
>>     asm_fast.gc.stseg.trseg
>>     asm_fast.gc.stseg.debug
>>     ... etc
>>
>> If you wanted a non-stseg grade you would need to explicitly specify that
>> that grade be
>> installed.
>
> Ok for the debug grades as they are relatively slow anyway (and prone to
> running out of stack) but I'm not sure about asm_fast.gc.

I would be (slightly) concerned with asm_fast.gc if that was the grade
in which the compiler was still built**.  However, since for most users
that is now likely to be hlc.gc.pregen, that's no longer a problem.
(** at least on those systems where asm_fast.gc actually works.)

> The difference in performance seems to be more than I remember.
> (standard speed test)
>
>    EXTRA_MCFLAGS =
>    GRADE = asm_fast.gc
>    mercury_compile.01 average of 6 with ignore=1      9.06
>
>    EXTRA_MCFLAGS =
>    GRADE = asm_fast.gc.stseg
>    mercury_compile.02 average of 6 with ignore=1     10.24
>
>    EXTRA_MCFLAGS =
>    GRADE = hlc.gc
>    mercury_compile.03 average of 6 with ignore=1      8.63

The moral seems pretty clear here: use hlc.gc for the Mercury compiler!
(Although that's been the case for quite a while now.)

> Obviously experienced users can install asm_fast.gc explicitly if they
> want.

True.  Ok, for now let's switch the debug grades around to use stack
segments and then see if we can reduce the speed difference in the
non-debug grade cases.

Cheers,
Julien.



More information about the developers mailing list