* Ted Unangst <[email protected]> [2014-03-07 07:40]:
> On Thu, Mar 06, 2014 at 23:56, Lawrence Teo wrote:
> > pf_check_congestion() simply checks if ifq->ifq_congestion is non-zero,
> > and returns 1 or 0 accordingly.  It is only called by pf_test_rule().
> > 
> > Since what pf_check_congestion() does is very trivial and pf_test_rule()
> > is its only user, would it make sense to remove it and let
> > pf_test_rule() check ifq->ifq_congestion directly to save a function
> > call?
> 
> I think function calls are not so very expensive, and it makes it
> easier to read imo.

exactly.

making in static inline would be the max I'd find acceptable - but I'm
certain you won't be able to demonstrate any performance benefit
(previous profiling is pretty clear on that).

-- 
Henning Brauer, [email protected], [email protected]
BS Web Services GmbH, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed
Henning Brauer Consulting, http://henningbrauer.com/

Reply via email to