Optimize a given Python program to make it faster.
def optiFunc(n): 
    result = 0
    for i in range(n): 
        result += i 
    return result
def optiFunc(n):
    result = n * (n-1) / 2 
    return result