News for hackers. Stuff that matters.
Re:Whenever – typed and DST-safe datetimes for Python by BiteCode_dev on Sunday April 13, 2025 @02:55PM (#43674984)
Ah, so you are not using pyQT, numpy, any database driver, pillow or anything using cryptography, then?
Re:Whenever – typed and DST-safe datetimes for Python by Kwpolska on Sunday April 13, 2025 @03:58PM (#43675411)
For the libraries you listed, the benefits of using a native library are much larger, since they’re wrapping a well-known library that is known to be secure and fully-featured, or since the performance benefits are actually visible in any significant code snippet. But here, there is no Rust library to wrap, and I doubt the performance of a date-time library would have any effect on the performance of virtually all applications (maybe except for calendar apps).
Re:Whenever – typed and DST-safe datetimes for Python by karlicoss on Sunday April 13, 2025 @08:33PM (#43676977)
datetime handling can absolutely be a hot spot, especially if you're parsing or formatting them. Even for relatively simple things like "parse a huge csv file with dates into dataclasses".

In particular, default implementation of datetime in cpython is a C module (with a fallback to pure python one) https://github.com/python/cpython/blob/main/Modules/_datetim...

Not saying it's necessarily justified in case of this library, but if they want to compete with stdlib datetime in terms of performance, some parts will need to be compiled.