Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions components/calendar/benches/date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,32 +152,23 @@ fn date_benches(c: &mut Criterion) {
"calendar/chinese_cached",
&fxs,
icu::calendar::cal::ChineseTraditional::new(),
|y, m, d, c| {
Date::try_new_from_codes(None, y, types::MonthCode::new_normal(m).unwrap(), d, c)
.unwrap()
},
|y, m, d, c| Date::try_new_from_codes(None, y, types::Month::new(m).code(), d, c).unwrap(),
);

bench_calendar(
&mut group,
"calendar/dangi_cached",
&fxs,
icu::calendar::cal::KoreanTraditional::new(),
|y, m, d, c| {
Date::try_new_from_codes(None, y, types::MonthCode::new_normal(m).unwrap(), d, c)
.unwrap()
},
|y, m, d, c| Date::try_new_from_codes(None, y, types::Month::new(m).code(), d, c).unwrap(),
);

bench_calendar(
&mut group,
"calendar/hebrew",
&fxs,
icu::calendar::cal::Hebrew,
|y, m, d, c| {
Date::try_new_from_codes(None, y, types::MonthCode::new_normal(m).unwrap(), d, c)
.unwrap()
},
|y, m, d, c| Date::try_new_from_codes(None, y, types::Month::new(m).code(), d, c).unwrap(),
);

bench_calendar(
Expand Down
Loading
Loading