Object Fibbonachi. Python/Jython
public python v1 · immutableimport timeclass Fib: def __init__(self, n): self._value = n def value(self): if(self._value <= 2): return 1 f1 = Fib(self._value - 1) f2 = Fib(self._value - 2) return f1.value() + f2.value()st = int(time.time())print Fib(40).value()en = int(time.time())print "Time :", en-st