[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFA: invert-speedup-2.diff

From: Alexandre Duret-Lutz
Subject: Re: RFA: invert-speedup-2.diff
Date: Sun, 30 Mar 2003 01:02:08 +0100
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux)

>>> "Raja" == Raja R Harinath <address@hidden> writes:

 Raja> Here's the next part of the speedup.  This basically implements the
 Raja> following optimization:

 Raja> ab * (a | c | !b | d!e) = ab | abc | 0 | abd!e = ab

 Raja> With this, the time for 'make check' in 'lib/Automake/tests' goes
 Raja> from ~4.00s to ~0.75s.


 Raja> from  Raja R Harinath  <address@hidden>

550 unknown user ?

 Raja>  * lib/Automake/ (multiply): New.
 Raja>  * lib/Automake/ (_multiply): Use it.
 Raja>  (sub_conditions): Likewise.

ok, with the minor changes below

 Raja> +  # Now, $self is a common factor of the remaining conditions.
 Raja> +  # If one of the conditions is $self, we can discard the rest.
 Raja> +  return ($self,()) 
 Raja> +    if exists $res{$self};

Space after comma.

 Raja>  =item C<$self-E<gt>sub_conditions ($cond)>
 Raja>  Return the subconditions of C<$self> that contains C<$cond>, with
 Raja> -C<$cond> stripped.
 Raja> +C<$cond> stripped.  More formally, return $res such that 
 Raja> +$res->_multiply($cond) == $self->_multiply($cond) and $res does not
 Raja> +mention any of the variables in $cond.
 Raja>  For instance, consider:

Please use ->multiply in the (public) doc, not ->_multiply.  
DC::_multiply is an undocumented internal function.

Also you should wrap code parts within C<...>, and insert
a space between function names and opening parentheses.

 Raja> -  #      new Automake::Condition ("FALSE"));
 Raja> -  my $prod = $self->_multiply ($subcond);
 Raja> +  #      new Automake::Condition ("FALSE"))
 Raja> +  my @prodconds = $subcond->multiply($self->conds);

Space before the parenthesis here too.

You can get an idea of the coding style we try to follow here
(it's not always possible to follow this strictly, either because
of Perl or because of Emacs's Perl modes -- this latter point is
the reason why most of the old code is indented differently)

Thanks !
Alexandre Duret-Lutz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]