1번 코드

N, X = map(int, input().split())

V = list(map(int, input().split()))

for i in range(N):

if V[i] < X:

print(V[i], end=' ')


2번 코드

N, X = map(int, input().split())

V = list(filter(lambda x: int(x)<X, input().split()))

print(' '.join(V))


백준 10871번 문제임.

1번 코드는 예전에 쓴거고, 오늘 람다 배워서 겁나 뿌듯하게 실행시간 줄여야지 하고 2번 코드를 만들었는데,

40ms -> 44ms 로 실행시간이 오히려 늘어남. 코드도 더 짧고 for문도 없는데 왜 더 실행시간이 늘어난걸까 이유가 뭘까