Aaron Sherman <[EMAIL PROTECTED]> wrote:

> What might be interesting is to compare Parrot to Parrot doing this with
> and without a hyper-operator. That's all I was trying to say.

I'd posted that as well. Here again with an O3 build of parrot:

$ time parrot  ih.imc
6060

real    0m0.214s
user    0m0.150s
sys     0m0.040s

$ time parrot -j  i.imc
6060

real    0m1.793s
user    0m1.750s
sys     0m0.040s

Both are using the same natural int array. But the builtin does use list
internals to directly access list chunk memory. This is of course only
possible for natural types in our aggregates, where no vtable is needed
to access the aggregates data members. But the numbers do indicate, that
number crunchers just want that.

> As for the DOD: you have an excellent point, but it extends far beyond
> the hyper-operators. I'm starting to think that front-ends like the
> Python compiler or the Perl 6 compiler are going to need controls over
> the DOD for just the reasons you cite. After all, they know when they
> are about to start doing some large looping operation that's all highly
> constrained with respect to allocation. It would make sense to gather
> the resources they need, lock down DOD, do what they need to do and then
> unlock the DOD...

Well, it's unlikely that we can expose all the details the more that
such details may change. We could have a generalized version of such an
operation though:

  i_need_now_x_pmcs_and_wont_dispose_any_start   100000
  # ... deep clone code or loop
  i_need_now_x_pmcs_and_wont_dispose_any_end

er EOPCODETOOLONG :)

But as soon as there are any temps created inside that code, this might
already fail miserably because of resource outage. OTOH a compiler now
already can emit:

  sweep 1
  sweepoff
  ... deep clone or some such
  sweepon

leo

Reply via email to