List Info

Thread: Optimizing by avoiding copies (was: Re: the utf8 flag)




Optimizing by avoiding copies (was: Re: the utf8 flag)
user name
2007-03-30 17:14:12
Tels skribis 2007-03-31  0:03 (+0000):
> > Indeed, but this is an optimization. Optimization
isn't part of teaching
> > how things work, it always comes after.
> I almost agree. 
> Some decisions really need to be done early on, in the
design phase. You
> cannot optimize when the design is broken.  E.g. if
your data needs to
> be copied around *per design*, the best you can achive
is O(N). When
> you do not have to copy the data, you suddenly can
achive O(1). This
> distinctions is quite important, and not something you
can fix
> aftwards apart from redesigning (aka let's break and
re-assemble it 

With Data::Alias you have a fair chance.

utf8::decode and utf8::encode provide similar opportunities
to optimize
after the fact.

I don't see how decoding and encoding in-place or copying
would be part
of your design, or greatly influence it.
-- 
korajn salutojn,

  juerd waalboer:  perl hacker  <juerdjuerd.nl>  <http://juerd.nl/sig>
  convolution:     ict solutions and consultancy
<salesconvolution.nl>

Ik vertrouw stemcomputers niet.
Zie <ht
tp://www.wijvertrouwenstemcomputersniet.nl/>.

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )