Skip to content

Commit 9931ddc

Browse files
author
Hendrik van Antwerpen
committed
Restore parameters
1 parent 67a088e commit 9931ddc

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

crates/bpe/benchmarks/performance.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -200,23 +200,15 @@ fn worstcase_comparison_benchmark(c: &mut Criterion) {
200200
&bytes,
201201
|b, bytes| {
202202
b.iter_batched(
203-
|| {
204-
let text = select_test_string(&text, *bytes);
205-
assert!(tok.split(text).nth(1).is_none());
206-
text
207-
},
203+
|| select_test_string(&text, *bytes),
208204
|text| tok.encode(text),
209205
criterion::BatchSize::SmallInput,
210206
)
211207
},
212208
);
213209
group.bench_with_input(BenchmarkId::new("tiktoken", bytes), &bytes, |b, bytes| {
214210
b.iter_batched(
215-
|| {
216-
let text = select_test_string(&text, *bytes);
217-
assert!(tok.split(text).nth(1).is_none());
218-
text
219-
},
211+
|| select_test_string(&text, *bytes),
220212
|text| tiktoken.encode_ordinary(text),
221213
criterion::BatchSize::SmallInput,
222214
)
@@ -226,11 +218,7 @@ fn worstcase_comparison_benchmark(c: &mut Criterion) {
226218
&bytes,
227219
|b, bytes| {
228220
b.iter_batched(
229-
|| {
230-
let text = select_test_string(&text, *bytes);
231-
assert!(tok.split(text).nth(1).is_none());
232-
text
233-
},
221+
|| select_test_string(&text, *bytes),
234222
|text| huggingface.encode_fast(text, false).unwrap(),
235223
criterion::BatchSize::SmallInput,
236224
)

0 commit comments

Comments
 (0)