Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Perf: Use computed offset passed in DateTime constructor (#1576)
* Add benchmark for DateTime.local with zone * Use computed offset passed in DateTime constructor All calls to the datetime constructor that pass an offset (o), have just computed that offset (quickDT, fromObject) except for clone(). Clone passes an "old" option to determine whether previous offset can be reused. If we have config.o, but config.old is not set, then we can use o without computing it. This saves an expensive call to zone.offset that duplicates work that was done immediately prior.
- Loading branch information