-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize Timestamp Reads in ion-c extension (#337)
* Refactor Timestamp construction This change pulls the heavy validation logic out of the __new__ and into the __init__. This preserves the contract for the constructor while providing a "fast" object construction for those who call __new__ directly. In the next commit, I change the ionc extension module to call it. I also added the fractional_seconds to __repr__ because it was difficult to debug without that. * Optimize creation of Timestamps in ionc read This change avoids building a dict of keyword args and calls the __new__ method directly. Per a benchmark test of all the timestamps from the "vector" tests, it's about 2.7x faster.
- Loading branch information
1 parent
193e86b
commit 557ac00
Showing
3 changed files
with
179 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.