To "if, if, if" or to "if, if else, if else, else"
I am writing some code for data analysis, and have to exclude samples base on some criteria. In practice i end up writing code such as:

    bool Test(SampleType sample)
    {
      if( ! SubTest1(sample) )
        return false;
      if( ! SubTest2(sample) )
        return false;
      if( ! SubTest3(sample) )
        return false;
    
      return true;
    }
The following seems equivalent to me:

    bool Test(SampleType sample)
    {
      if( ! SubTest1(sample) )
        return false;
      else if( ! SubTest2(sample) )
        return false;
      else if( ! SubTest3(sample) )
        return false;
      else 
        return true;
    }
Is there a difference in terms of computing cost? Is there a arguable preferential one in terms of extendibility/maintainability, aesthetics, etc...?

I know this probably a inconsequential issue, but once i get these questions stuck in my head I NEED to find the answer.

To "if, if, if" or to "if, if else, if else, else"
===

I am writing some code for data analysis, and have to exclude samples base on some criteria. In practice i end up writing code such as:

    bool Test(SampleType sample)
    {
      if( ! SubTest1(sample) )
        return false;
      if( ! SubTest2(sample) )
        return false;
      if( ! SubTest3(sample) )
        return false;
    
      return true;
    }
The following seems equivalent to me:

    bool Test(SampleType sample)
    {
      if( ! SubTest1(sample) )
        return false;
      else if( ! SubTest2(sample) )
        return false;
      else if( ! SubTest3(sample) )
        return false;
      else 
        return true;
    }
Is there a difference in terms of computing cost? Is there a arguable preferential one in terms of extendibility/maintainability, aesthetics, etc...?

I know this probably a inconsequential issue, but once i get these questions stuck in my head I NEED to find the answer.
