|
|
Subscribe / Log in / New account

Faster CPython at PyCon, part one

Faster CPython at PyCon, part one

Posted May 10, 2023 6:37 UTC (Wed) by tchernobog (guest, #73595)
Parent article: Faster CPython at PyCon, part one

Does anybody know if specifying type annotations such as floats are able to skip the adaptive instructions and go to their specialized counterparts directly?


to post comments

Faster CPython at PyCon, part one

Posted May 10, 2023 6:43 UTC (Wed) by dureuill (guest, #164965) [Link]

To my knowledge it doesn't: type annotations are not used at runtime. Plus, nothing at runtime prevents a user from calling such an annotated function with the wrong types anyway.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds