neo4j / neo4j-python-driver

Neo4j Bolt driver for Python
https://neo4j.com/docs/api/python-driver/current/
Other
883 stars 187 forks source link

Improve performance of `from_ordinal` of temporal types. #1046

Closed robsdedude closed 3 months ago

robsdedude commented 3 months ago

Speeds up the function by about a factor of 100 (depending on the exact ordinal chose).

robsdedude commented 3 months ago

There actually are tests :innocent: https://github.com/neo4j/neo4j-python-driver/blob/c0e92fb2e4f0fd8997cbd00a2c34e09f7fd1d757/tests/unit/common/time/test_date.py#L55-L89

Their exhaustiveness is very debatable though ;)