Sylvia Else wrote:
> Essentially the compiler will not reorder the actions of an SC program if
> the consequence is observable.
As long as we all have the same notion of "observable".
> Neither the language nor the JMM say anything about how long things take.
> I'd argue that in that context, there can be no such thing as a "correct"
> benchmark that purports to measure the time taken by unobservable
Taking that to the extreme a benchmark that produces only a time measurement
has no observable consequences other than that time measurement, and so
given the language and the JMM say nothing about how long things take, a
"correct" transformation of that benchmark would be a program that simply
gives the result of subtracting two consecutive time measurements, throwing
away the entire workload of the benchmark itself.
The problem with timing measurements is that the "unobservable" workload
does have an observable affect - it's just not a direct affect on a memory
> In any case, I don't think you'd get much sympathy for a model that slows
> things down in order for it to be possible to see how slow they were ;)
Much like GUI progress bars :-)
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:08 EDT