(j3.2006) Did we intend to prohibit this?

Van Snyder van.snyder
Tue Mar 14 00:15:53 EDT 2017

On Tue, 2017-03-14 at 10:07 +0900, Cohen Malcolm wrote:
> The amount of effort being expended on this pointless argument is
> doubtless greater than any amount of cpu time spent or saved by doing
> or not doing some optimisation or other.

Since I can't tell whether a processor optimizes

  v = f(x)

to do what

  call move_alloc ( f(x), v )

would obviously do, because instead of answering the question my request
got shouted down, and I assume there aren't command-line options to
request that a processor do it or suppress it, I can't use a profiler to
find out if this is true.  Does anybody have profiler results, from 1/3
million-line codes that run fifteen hours on 400 cores, to verify this?

My code spends 88% of its time in one module.  That module had numerous
procedures, each having numerous local automatic variables, each sized
according to the current problem.  It was spending 12% of its time in
the storage allocator.  I moved those local automatic variables to the
main procedure in the module, sized them according to the maximum
problem size, and converted the other procedures into internal
procedures that access those variables by host association, which
reduced the time spent in the storage allocator from 12% to 3%.  This
observation suggested to me that answers to questions about avoiding the
storage allocator would be useful at least to me.

More information about the J3 mailing list