[m-rev.] diff: six percent speedup

Ralph Becket rafe at cs.mu.OZ.AU
Wed Mar 30 11:11:52 AEST 2005


Zoltan Somogyi, Wednesday, 30 March 2005:
> These are the benchmark results.
> 
> EXTRA_MCFLAGS = 
> EXTRA_CFLAGS = -DMR_CHECK_DU_EQ
> GRADE = asm_fast.gc
> mercury_compile.01 average of 12 with ignore=1     49.44
> EXTRA_MCFLAGS = 
> EXTRA_CFLAGS = 
> GRADE = asm_fast.gc
> mercury_compile.02 average of 12 with ignore=1     52.56

Excellent!  The diff looks fine.  I think it would also be worth
making the following alteration in runtime/mercury_string.h

#define MR_string_equal(s1,s2) (strcmp((char*)(s1),(char*)(s2))==0)

to

#define MR_string_equal(s1,s2) \
	((char*)(s1)==(char*)(s2) || strcmp((char*)(s1),(char*)(s2))==0)

as part of this change.  I've checked the definition of strcmp on ceres
(/usr/include/bits/string.h) and it doesn't appear to check for pointer
equality before checking for string equality.

-- Ralph
--------------------------------------------------------------------------
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