Skip to content

Benchmark improvements #38

@jhpratt

Description

@jhpratt

Some things that I noticed while looking through the benchmarks:

  • Why assert_eq! on everything? Wouldn't let _ = black_box(foo); be sufficient for the compiler?
  • Related to the previous, there's no need to calculate the Unix timestamp when checking for equality for either chrono or time. The values can be compared directly, avoiding an unrelated computation.
  • parse_civil_datetime can use the well-known ISO 8601 format for time, which should be significantly faster. Otherwise it's using the same parsing mechanism as your strptime test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions