Is there a difference in performance between these two examples:
Example 1:
class Calculator:
def add(self, a, b):
return a+b
import Calculator
calc = Calculator()
print(calc.add(1, 2))
Example 2:
def add(a, b)
return a+b
from Calculator import add
print(add(1, 2))
Am i going to have performance issues with going for classes instead of imported functions? Considering Multithreading and Multiprocessing.