[m-rev.] for review: reduce accesses to thread-specific variable

Julien Fischer juliensf at csse.unimelb.edu.au
Fri Jul 7 18:41:05 AEST 2006


On Fri, 7 Jul 2006, Peter Wang wrote:

> On saturn this change makes asm_jump.par.gc 7% slower than asm_jump.gc,
> rather than 21% slower as it was before (according to speedtest).
>
> Estimated hours taken: 5
> Branches: main
>
> In low-level, parallel grades which don't use gcc global registers, each
> reference to a Mercury register (etc.) references a thread-specific Mercury
> engine base address `MR_thread_engine_base'.  This is either a thread-specific
> variable or a call to pthread_getspecific().  This patch improves performance
> in these grades by copying `MR_thread_engine_base' once at the start of each
> basic block into a local variable, then using the local copy for the rest of
> the basic block.

s/the/that/

>
> compiler/options.m:
> 	Add `--local-thread-engine-base' option, enabled by default.

Does this option need to be set consistently for all modules during
compilation, or is it safe for some modules to be compiled with
--local-thread-engine-base and some with --no-thread-engine-base.  If the
former then the documentation should make mention of it.

Also, you need to update the user's guide.

The rest looks okay.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list