Optimize a Python program to calculate the volume of a cube.
def volume_of_cube(edge_length):
    return edge_length * edge_length * edge_length
    
print(volume_of_cube(3))
def volume_of_cube(edge_length):
    return edge_length ** 3
    
print(volume_of_cube(3))