Can casting to fragment be more efficient than using a variable?
You could make it more dynamic. Because this method adds the Fragment only to the R.id.fragment_secondpane layout. If this is all what you desire, it's ok. Otherwise add a parameter for the layout. This way you can use your method to add a Fragment to different layouts.

Because every type of Fragment like ListFragment, DialogFragment or even a SherlockFragment is using Fragment as super class, you can use Fragment as the parameter type. There's no need to use Object. Note that you should avoid to mix the Fragment types of different librarys.

With methods like this you can avoid extra code in this situation, replacing different Fragments of a specific layout. 

The processing will be the same. The creation of the necessary objects have to be done. There will be no difference if this happens in e.g. onCreate or the method you wrote. The only thing you could avoid is to hold an extra reference of the FragmentManager.

To sum all up you would have something like this:

private void changeFrag(int layout, Fragment newFrag){

    getSupportFragmentManager() // gets the FragmentManager of the Activity, no need to hold a reference
         .beginTransaction()
         .replace(layout, newFrag) // use the layout and the fragment, no need for a cast
         .commit();

}


Note that this method will work and is straightforward. If you have an approach with adding some Fragments to the backstack and some not or using different kind of animations, your method will be more complex and lacks performance. That's why I would not use this in every situation.