[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MATLAB
At 09:09 PM 12/10/2001 -0800, Morgan McGuire wrote:
> > Under what circumstances should a language implementor *not* use
> > copy-on-mutate? Where's the cost?
>
>Any lazy evaluation has a wierd impact on performance... the net
>performance is always as good or better than eager evaluation but it
>happens at different times. This makes profiling a mess and can be
>tricky for real-time applications. Most scripting people don't care
>about either.
>
>Some lazy schemes have issues with side effects (especially errors and
>exceptions!) happening at unpredictable times, but with copying you're
>safe... no side effects should occur (unless you have copy
>constructors, but that's a whole other mess).
Side-effects are the only reason I'm not going wild with full laziness in
the parrot engine. (Perl, alas, is sometimes almost entirely side-effects)
I'd really, *really* love to be able to have someone have a program that is
exactly this:
@some_array = (1..1000000, bar());
print "Hi\n";
and never actually call bar, nor construct the million element list of
integers from 1 to 1000000. Not doing things is generally faster than doing
things, at least in my experience. :)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk
- References:
- Re: MATLAB
- From: "Seth Gordon" <sethg@ropine.com>
- Re: MATLAB
- From: Morgan McGuire <morgan3d@yahoo.com>