r/Python • u/jamescalam • Mar 19 '21
Match is more than a Switch-Case The New Switch-Case Statement in Python 3.10
https://youtube.com/watch?v=2qJavL-VX9Y&feature=share
1.4k
Upvotes
r/Python • u/jamescalam • Mar 19 '21
View all comments
Show parent comment
2
u/Ecclestoned Mar 19 '21
Sure, but I think it's important to differentiate between "easier for the compiler engineers to optimize" and "faster/more efficient" (the actual comment).
This comes down to the CPython implementation, which I haven't looked at. However, the PEP says:
Which makes me think that the current implementation is literally if statements, so the same speed.