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.
Some things that I noticed while looking through the benchmarks:
assert_eq!on everything? Wouldn'tlet _ = black_box(foo);be sufficient for the compiler?chronoortime. The values can be compared directly, avoiding an unrelated computation.parse_civil_datetimecan use the well-known ISO 8601 format fortime, which should be significantly faster. Otherwise it's using the same parsing mechanism as yourstrptimetest.