develooper Front page | perl.perl5.porters | Postings from March 2007

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

Thread Previous | Thread Next
Juerd Waalboer
March 30, 2007 15:14
Optimizing by avoiding copies (was: Re: the utf8 flag)
Message ID:
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  <>  <>
  convolution:     ict solutions and consultancy <>

Ik vertrouw stemcomputers niet.
Zie <>.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About