Stas Bekman <[EMAIL PROTECTED]> writes:

> I even have a name for the project: Speedy Code Habits  :)
> 
> The point is that I want to develop a coding style which tries hard to  
> do early premature optimizations.

I disagree with the POV you seem to be taking wrt "write-time" 
optimizations.  IMO, there are precious few situations where
writing Perl in some prescribed style will lead to the fastest code.
What's best for one code segment is often a mediocre (or even stupid)
choice for another.  And there's often no a-priori way to predict this
without being intimate with many dirty aspects of perl's innards.

I'm not at all against divining some abstract _principles_ for
"accelerating" a given solution to a problem, but trying to develop a 
"Speedy Style" is IMO folly.  My best and most universal advice would 
be to learn XS (or better Inline) and use a language that was _designed_
for writing finely-tuned sections of code.  But that's in the
post-working-prototype stage, *not* before.

[...]

> mod_perl specific examples from the guide/book ($r->args vs 
> Apache::Request::param, etc)

Well, I've complained about that one before, and since the 
guide's text hasn't changed yet I'll try saying it again:  

  Apache::Request::param() is FASTER THAN Apache::args(),
  and unless someone wants to rewrite args() IN C, it is 
  likely to remain that way. PERIOD.

Of course, if you are satisfied using Apache::args, than it would
be silly to change "styles".

YMMV
-- 
Joe Schaefer

Reply via email to