{"action":"opened","issue":{"url":"https://api.github.com/repos/hadley/lubridate/issues/324","labels_url":"https://api.github.com/repos/hadley/lubridate/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/hadley/lubridate/issues/324/comments","events_url":"https://api.github.com/repos/hadley/lubridate/issues/324/events","html_url":"https://github.com/hadley/lubridate/issues/324","id":76069738,"number":324,"title":"Consider faster implementations of accessor functions","user":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-13T17:55:15Z","updated_at":"2015-05-13T17:55:15Z","closed_at":null,"body":"I think many of the access functions (e.g. `year()`, `yday()`) could be reimplemented much more efficiently by taking advantage of the fact that it's easy to determine year offsets with a lookup table (e.g. https://github.com/hadley/readr/blob/master/src/DateTime.h). My intuition is that plus some modular arithmetic should be orders of magnitude faster than using `as.POSIXlt`"}}