about summary refs log tree commit diff
path: root/src/libcore/benches
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-1552/+0
2020-07-06Remove pointless `black_box` call, add a comment about the `unaligned_` ↵Thom Chiovoloni-4/+5
benches, and clean up stray semicolon
2020-07-05Add 'unrolled' is_ascii_align_to benchmark, and move is_ascii benchmarks ↵Thom Chiovoloni-76/+83
into own file
2020-07-05Benchmark the unaligned case for is_ascii, and add missing SAFETYThom Chiovoloni-3/+21
2020-07-05Add benchmark for slice is_ascii using align_toThom Chiovoloni-1/+24
2020-07-05Avoid `vec!` allocation in `is_ascii_slice_*` benchesThom Chiovoloni-9/+36
2020-07-05Optimize is_ascii for &str and &[u8]Thom Chiovoloni-0/+8
2020-06-18Disable core benches on wasm (benches not supported).Eric Huss-0/+2
2020-04-06Use assoc float consts in libcoreLinus Färnstrand-2/+0
2020-04-05Stop importing int/float modules in libcoreLinus Färnstrand-2/+0
2019-12-22Format the worldMark Rousskov-1/+0
2019-12-16Add benchmarks for `start_with` and `ends_with`Andrea Canciani-0/+44
2019-12-06Format libcore with rustfmt (including tests and benches)David Tolnay-103/+87
2019-12-06Exclude manually arranged ascii tables from rustfmtDavid Tolnay-0/+2
2019-11-23make `./x.py bench` againMazdak Farrokhzad-2/+2
2019-11-06Have tidy ensure that we document all `unsafe` blocks in libcoreOliver Scherer-0/+2
2019-08-06Improve `ptr_rotate` performance, tests, and benchmarksAaron Kutch-0/+26
2019-06-14Change `...` to `..=` where applicableAaron Kutch-4/+4
2019-04-18libcore => 2018Taiki Endo-1/+0
2019-04-06Tiny docs fixTobias Bucher-1/+1
2019-04-02Rollup merge of #59262 - timvermeulen:iterator_cmp_dedup, r=scottmcmMazdak Farrokhzad-0/+10
Remove duplicated code from Iterator::{ne, lt, le, gt, ge} This PR delegates `Iterator::ne` to `Iterator::eq` and `Iterator::{lt, le, gt, ge}` to `Iterator::partial_cmp`. Oddly enough, this change actually simplifies the generated assembly [in some cases](https://rust.godbolt.org/z/riBtNe), although I don't understand assembly well enough to see if the longer assembly is doing something clever. I also added two extremely simple benchmarks: ``` // before test iter::bench_lt ... bench: 98,404 ns/iter (+/- 21,008) test iter::bench_partial_cmp ... bench: 62,437 ns/iter (+/- 5,009) // after test iter::bench_lt ... bench: 61,757 ns/iter (+/- 8,770) test iter::bench_partial_cmp ... bench: 62,151 ns/iter (+/- 13,753) ``` I have no idea why the current `lt`/`le`/`gt`/`ge` implementations don't seem to be compiled optimally, but simply having them call `partial_cmp` seems to be an improvement. See #44729 for a previous discussion.
2019-03-19ASCII uppercase: add "subtract multiplied bool" benchmarkSimon Sapin-0/+12
2019-03-19ASCII uppercase: add "subtract shifted bool" benchmarkSimon Sapin-0/+12
2019-03-19Simplify u8::to_ascii_{upp,low}ercase while keeping it fastSimon Sapin-1/+23
2019-03-19Benchmark more possibles impls of [u8]::make_ascii_uppercaseSimon Sapin-1/+83
2019-03-18Add benchmarks for `u8::is_ascii*`Simon Sapin-17/+32
2019-03-18Rename src/libcore/benches/ascii_case.rs to ascii.rsSimon Sapin-1/+7
2019-03-18TidySimon Sapin-2/+4
2019-03-18Add benchmark for not-quite-correct “fake SIMD” make_ascii_uppercaseSimon Sapin-0/+46
2019-03-18Make u8::to_ascii_lowercase and to_ascii_uppercase branchlessSimon Sapin-21/+1
2019-03-18Add benchmarks for [u8]::make_ascii_uppercaseSimon Sapin-0/+173
2019-03-17Add iter::{bench_partial_cmp, bench_lt} benchmarksTim Vermeulen-0/+10
2019-03-12Fix the bench_max and bench_max_by_key benchmarksTim Vermeulen-2/+2
2019-02-27Add trailing newlineTim Vermeulen-1/+1
2019-02-27Improve existing benchmarks to prevent extreme optimizationsTim Vermeulen-2/+2
2019-02-27Add relevant benchmarksTim Vermeulen-0/+28
2019-01-12Add fmt benchmarksShotaro Yamada-0/+111
2018-12-25Remove licensesMark Rousskov-140/+0
2018-12-09Override Cycle::try_foldShotaro Yamada-0/+6
name old ns/iter new ns/iter diff ns/iter diff % speedup iter::bench_cycle_take_ref_sum 927,152 927,194 42 0.00% x 1.00 iter::bench_cycle_take_sum 938,129 603,492 -334,637 -35.67% x 1.55
2018-11-21core/benches/num: Add `from_str/from_str_radix()` benchmarksTobias Bieniek-0/+105
2018-11-13core/benches: Add `char::to_digit()` benchmarksTobias Bieniek-0/+54
2018-08-29bench: libcore: fix build failure of any.rs benchmark (use "dyn Any")Matthias Krüger-1/+1
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-2/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-03-20Stabilize slice patterns without `..`Vadim Petrochenkov-1/+0
Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`
2018-03-01Specialize Zip::nth for TrustedRandomAccessScott McMurray-0/+29
Makes the bench asked about on URLO 58x faster :)
2017-11-17Auto merge of #45595 - scottmcm:iter-try-fold, r=dtolnaybors-0/+6
Short-circuiting internal iteration with Iterator::try_fold & try_rfold These are the core methods in terms of which the other methods (`fold`, `all`, `any`, `find`, `position`, `nth`, ...) can be implemented, allowing Iterator implementors to get the full goodness of internal iteration by only overriding one method (per direction). Based off the `Try` trait, so works with both `Result` and `Option` (:tada: https://github.com/rust-lang/rust/pull/42526). The `try_fold` rustdoc examples use `Option` and the `try_rfold` ones use `Result`. AKA continuing in the vein of PRs https://github.com/rust-lang/rust/pull/44682 & https://github.com/rust-lang/rust/pull/44856 for more of `Iterator`. New bench following the pattern from the latter of those: ``` test iter::bench_take_while_chain_ref_sum ... bench: 1,130,843 ns/iter (+/- 25,110) test iter::bench_take_while_chain_sum ... bench: 362,530 ns/iter (+/- 391) ``` I also ran the benches without the `fold` & `rfold` overrides to test their new default impls, with basically no change. I left them there, though, to take advantage of existing overrides and because `AlwaysOk` has some sub-optimality due to https://github.com/rust-lang/rust/issues/43278 (which 45225 should fix). If you're wondering why there are three type parameters, see issue https://github.com/rust-lang/rust/issues/45462 Thanks for @bluss for the [original IRLO thread](https://internals.rust-lang.org/t/pre-rfc-fold-ok-is-composable-internal-iteration/4434) and the rfold PR and to @cuviper for adding so many folds, [encouraging me](https://github.com/rust-lang/rust/pull/45379#issuecomment-339424670) to make this PR, and finding a catastrophic bug in a pre-review.
2017-11-11Improve the performance of binary_search by reducing the number ofAlkis Evlogimenos-1/+68
unpredictable conditional branches in the loop. In addition improve the benchmarks to test performance in l1, l2 and l3 caches on sorted arrays with or without dups. Before: ``` test slice::binary_search_l1 ... bench: 48 ns/iter (+/- 1) test slice::binary_search_l2 ... bench: 63 ns/iter (+/- 0) test slice::binary_search_l3 ... bench: 152 ns/iter (+/- 12) test slice::binary_search_l1_with_dups ... bench: 36 ns/iter (+/- 0) test slice::binary_search_l2_with_dups ... bench: 64 ns/iter (+/- 1) test slice::binary_search_l3_with_dups ... bench: 153 ns/iter (+/- 6) ``` After: ``` test slice::binary_search_l1 ... bench: 15 ns/iter (+/- 0) test slice::binary_search_l2 ... bench: 23 ns/iter (+/- 0) test slice::binary_search_l3 ... bench: 100 ns/iter (+/- 17) test slice::binary_search_l1_with_dups ... bench: 15 ns/iter (+/- 0) test slice::binary_search_l2_with_dups ... bench: 23 ns/iter (+/- 0) test slice::binary_search_l3_with_dups ... bench: 98 ns/iter (+/- 14) ```
2017-10-29Fundamental internal iteration with try_foldScott McMurray-0/+6
This is the core method in terms of which the other methods (fold, all, any, find, position, nth, ...) can be implemented, allowing Iterator implementors to get the full goodness of internal iteration by only overriding one method (per direction).
2017-10-04seperate and move miscellaneous benchmarks to librustcNiv Kaminer-69/+0
2017-09-30address some `FIXME`s whose associated issues were marked as closedNiv Kaminer-1/+0
remove FIXME(#13101) since `assert_receiver_is_total_eq` stays. remove FIXME(#19649) now that stability markers render. remove FIXME(#13642) now the benchmarks were moved. remove FIXME(#6220) now that floating points can be formatted. remove FIXME(#18248) and write tests for `Rc<str>` and `Rc<[u8]>` remove reference to irelevent issues in FIXME(#1697, #2178...) update FIXME(#5516) to point to getopts issue 7 update FIXME(#7771) to point to RFC 628 update FIXME(#19839) to point to issue 26925