Due to the hierarchical design of current shared memory systems, the performance behavior of most algorithms varies in a small number of large regions corresponding to small size, medium size and large size inputs. The constants involved in the complexity formula usually have different values for these regions. We propose an algorithm that, assuming a complexity formula for the memory resources is known, proposes a partition of the algorithm input size space in a small number of regions and gives the values of the algorithmic constants for such regions. This way, though the complexity formula is the same, the family of constants provides the adaptability of the formula to the different memory use stationary states. All these tasks are automatically accomplished by the accompanying software tool that gives support to the proposed analytical model.