uranusjr commented on PR #33983:
URL: https://github.com/apache/airflow/pull/33983#issuecomment-1702340978

   Not sure this is advantaguous. Readability is approximately on par, but
   
   ```pycon
   $ py -m timeit -s 't = dict; from typing import Dict' 't in (dict, Dict)'
   10000000 loops, best of 5: 25 nsec per loop
   $ py -m timeit -s 't = dict; from typing import Dict' 't is dict or t is 
Dict'
   20000000 loops, best of 5: 9.98 nsec per loop
   $ py -m timeit -s 't = dict; from typing import Dict' 't is Dict or t is 
dict'
   20000000 loops, best of 5: 13.7 nsec per loop
   ```
   
   the `is` version is consistently faster.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to