On Thu, 3 Jun 2010, Vijay S. Mahadevan wrote:

> Also, looking at your changes, I'm just curious on why you removed the
> implicitly_active() check.

Given two options for code, each of which might be faster:

> That could save a lot of "variable.active_on_subdomain()" calls
> since the variable active on all subdomains is the default case.

or might be slower:

active_on_subdomain() is already an inline function which (through
another inline STL function) first tests whether a single integer is
zero; adding an equivalent test beforehand might not help in the
default case and might be worse in the non-default case.

then (especially if it's not in a performance-critical part of the
code) I like to ignore faster vs. slower and just go with simpler.

> And, if you move getting the variable reference before the "family
> == SCALAR" check, you could reuse the reference.

You're right; I'll change that now.
---
Roy

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to