Skip to content

Why is DateTime 36 bytes? #399

Description

@tyt2y3
std::mem::size_of::<jiff::civil::DateTime>() = 36;
std::mem::size_of::<chrono::DateTime<chrono::FixedOffset>>() = 16;

in comparison chrono::DateTime is just 16 bytes.

std::mem::size_of::<jiff::Timestamp>() = 40;
std::mem::size_of::<jiff::Zoned>() = 96;

Timestamp is also quite big for what can be represented with u128, but Zoned is even bigger.

Why is that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions