Question: JSP code

```
<t:panelTabbedPane align="left"  serverSideTabSwitch="false" styleClass="tabbedPane" 
            activeTabStyleClass="activeTab" inactiveTabStyleClass="inactiveTab" width="100%" cellpadding="0"
            cellspacing="0" tabContentStyleClass="tabContent" style="margin-top:0px;text-align:center"
            selectedIndex="#{myBB.selectedTab}">

```

/***\**\*\**\**\*\**\**\*\**\**\*\**\**\*\**\**\*\**\**\*\**\**\*\**\**\*\**\**\*\**\**\*\**\**\*\**\**\*\**\**\*\*\***/

Backing Bean Code:

```
private int selectedIndex;

    public int getSelectedIndex() {
        System.out.println("getter of selectedIndexis called "+selectedIndex);
        return selectedIndex;
    }

    public void setSelectedIndex(int selectedIndex) {
        System.out.println("Setter of selectedIndexis called "+selectedIndex);
        this.selectedIndex= selectedIndex;
    }

```

The backing bean is of session scope.
When i change panelTab in the screen and click on submit button, always the default panel is being shown. I checked the console to find the sysout from setter of selectedIndex.But in console it is not being printed which means(I suppose) the selectedIndex is not being posted to the server.I'm using JSF version 1.1. Can any one suggest how to make this work ?

Answer: 
With most modern C++ compilers you can assume that the performance overhead when constructing an object does not depend on the number of virtual methods.

And when actually calling the methods I would expect the overhead not being larger than that of any alternative implementation method.

And if these function calls do "complicated" things like network operations then you don't really need to bother about such micro-optimisations anyhow, it will be completely irrelevant.
From a performance view, the number of virtual methods does not matter in C++ (there is a small constant price to pay for the indirection, regardless of the number of methods).