rust/src/libcore/benches
Josh Stone 61a7703e55 Customize <FlatMap as Iterator>::fold
`FlatMap` can use internal iteration for its `fold`, which shows a
performance advantage in the new benchmarks:

    test iter::bench_flat_map_chain_ref_sum ... bench:   4,354,111 ns/iter (+/- 108,871)
    test iter::bench_flat_map_chain_sum     ... bench:     468,167 ns/iter (+/- 2,274)
    test iter::bench_flat_map_ref_sum       ... bench:     449,616 ns/iter (+/- 6,257)
    test iter::bench_flat_map_sum           ... bench:     348,010 ns/iter (+/- 1,227)

... where the "ref" benches are using `by_ref()` that isn't optimized.
So this change shows a decent advantage on its own, but much more when
combined with a `chain` iterator that also optimizes `fold`.
2017-09-14 13:51:32 -07:00
..
hash Extract collections benchmarks to libcollections/benches 2017-02-06 21:38:47 +11:00
num num: add minimal benchmarks for full floating-point formatting 2017-04-28 15:24:09 -04:00
any.rs Extract collections benchmarks to libcollections/benches 2017-02-06 21:38:47 +11:00
iter.rs Customize <FlatMap as Iterator>::fold 2017-09-14 13:51:32 -07:00
lib.rs Extract collections benchmarks to libcollections/benches 2017-02-06 21:38:47 +11:00
mem.rs Extract collections benchmarks to libcollections/benches 2017-02-06 21:38:47 +11:00
ops.rs Extract collections benchmarks to libcollections/benches 2017-02-06 21:38:47 +11:00