Optimize the following application in Python to reduce startup time.
import time

def func():
    start=time.time()
    i=0
    while(i<100000000):
        i+=1
    end=time.time()
    print(end-start)

func()
import time

def func():
    start=time.time()
    # Optimized code using range instead of while loop
    lst = range(100000000)
    end=time.time()
    print(end-start)

func()