-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a better time/duration representation #122
Comments
A good question to ask is, what impact would this have on memory and CPU performance of doing routing calculations? Do users want them in Duration instead of number of seconds? worth looking into! |
fn your_function(num: u32) -> (u32, Duration) {
let value = num;
let x = value + value;
let duration = Duration::from_secs(num.into());
let y = duration + duration;
(value, duration)
} Not a fan of the function call everytime a arithmetic operation is called. Overall, would take more CPU cycles and require the Struct in cache. |
Why not a NaiveTime alongside an integer for number of days? |
Good Idea. Maybe this can be a crate feature that you can enable?Message
ID: ***@***.***>
… |
Maybe we should use
std::time::Duration
instead ofu32
for time representation.I'm not sure about
stop_time.arrival_time
/stop_time.departure_time
(since it's a duration from midnight), but I least for transfers and pathways I think it would lead to better ergonomics.The text was updated successfully, but these errors were encountered: