ต้นไม้ if_elif มีประสิทธิภาพใน python

if direction == "w":
    point[POS_Y] -= 1
elif direction == "s":
    point[POS_Y] += 1
elif direction == "a":
    point[POS_X] -= 1
elif direction == "d":
    point[POS_X] += 1
POS_X = 0
POS_Y = 1
MAP_WIDTH = 20
MAP_HEIGHT = 15
point = [3,7]
while 1: # i've read that Python is more efficient using a 1 instead of a True
    # def player_movement(point):
    
    print('+' + '-' * MAP_WIDTH * 3 + '+')
    
    for coordinate_y in range(MAP_HEIGHT):
        print('|',end='')
        for coordinate_x in range(MAP_WIDTH):
            if point[POS_X] == coordinate_x and point[POS_Y] == coordinate_y:
                print('  @',end='') # it works with ' @ ' as well, but in Visual Code doesn't see though
            else:
                print('   ',end='')
        print('|')
    print('+' + '-' * MAP_WIDTH * 3 + '+')
    
    
    # player_movement([3,8])
    direction = readchar.readchar().decode()
    
    if direction == "w":
        point[POS_Y] -= 1
    elif direction == "s":
        point[POS_Y] += 1
    elif direction == "a":
        point[POS_X] -= 1
    elif direction == "d":
        point[POS_X] += 1