Sam Tregar <[EMAIL PROTECTED]> wrote:
> On Tue, 1 Aug 2000, John Tobey wrote:
> 
> > I propose that all internal and external functions be implemented in
> > header files and declared inline.  The external runtime API will be
> > generated by compiling non-inline wrappers.
> > 
> > This will make possible an interesting performance optimization with
> > GNU CC, whereby op_ppaddr is replaced by a local label, and runops is
> > a block of code that uses goto instead of function pointer calls.  It
> > could be kept clean (by Perl 5 standards) using techniques similar to
> > embed.pl's.
> 
> I counter-propose that we avoid early optimization.  I propose that our
> designs begin with readbility and modularity as their highest priorities.  
> Later we can optimize the sense out of it but at least it would be
> readable to start with.
> 
> I propose that we treat "clean (by Perl 5 standards)" as not clean enough
> for Perl 6.

Fair enough, but consider my proposal in two steps.  Concretely, we
should implement everything as inline from the start.  It is hardly
any more difficult to read functions declared inline than those that
are not.  The non-inline wrappers will have to be maintained, but they
will all be trivial and need only change when functions are added or
prototypes altered.  Heck, with a little discipline, they could be
generated like perlapi.c.

The first step (all-inline through wrappers) is not an optimization at
all, and therefore not an early optimization.  It allows for a lot of
future optimizations, though.

-- 
John Tobey, late nite hacker <[EMAIL PROTECTED]>
\\\                                                               ///
]]]             With enough bugs, all eyes are shallow.           [[[
///                                                               \\\

Reply via email to