[gclist] GCBench "benchmark" problem

Manoj Plakal plakal@cs.wisc.edu
Mon, 7 May 2001 18:25:05 -0500


Boehm, Hans wrote (Mon, May 07, 2001 at 03:32:20PM -0700) :
> That's another possible approach.  But one of the redeeming values of such a
> toy benchmark is that it can be ported across languages.  I don't know how
> to say "volatile" in Scheme or a number of other languages.  And some Java
> implementations seems to ignore "volatile" completely, since it's
> potentially expensive to implement correctly and I don't know of any
> implementations that actually handle it correctly.  See
> http://www.cs.umd.edu/~pugh/java/memoryModel/ for more details than you ever
> wanted to know on the Java issues.
> 
> Just making it a globally visible statically allocated variable would help.
> But I was afraid it might have more of an impact on implementations that
> currently do the right thing.

	How about printing out the pointer value or using the
	pointer to compute the return value of the procedure?

	That might be a portable way of preventing the optimizer 
	from removing it.

	Manoj