vendredi 22 mai 2020

Is there any overhead of using static member function over a normal function?

I am using template classes for making functions. So I decided to define the functions inside a class.

template<class T>
struct A
{
    static T F(){}
    static T F1(){}
};

There are no variables inside the struct that I need to use. I am calling the functions using A<int>::F(). Time is very important to my work (even nanoseconds). Is there any benefit to shift to simple template functions(not defined in a class or struct)?

Aucun commentaire:

Enregistrer un commentaire