Commit Graph

11 Commits

Author SHA1 Message Date
Nate Cook
e49a5b7655 Switch to benchmark remove* instead of drop* 2020-06-25 14:35:56 -05:00
Nate Cook
9855496a16 Add benchmarks for Substring.dropFirst(_:) and dropLast(_:) (#32473)
* Add benchmarks for Substring.dropFirst(_:) and dropLast(_:)

These are self-slicing operations, so they should be fast even for
this non-random-access collection.

* Fiddle with the iteration count and length
2020-06-25 10:53:14 -05:00
Pavol Vaskovic
b2776f33ce [benchmark] [Equal,Less]Substring setup overhead 2019-03-01 17:56:12 +01:00
Pavol Vaskovic
6b703141e3 [benchmark] Extract setup from SubstringComparable
SubstringComparable had setup overhead of 58 μs (26%).

This was a tricky modification: extracting `substrings` and `comparison` constants out of the run function surprisingly resulted in decreased performance. For some reason this configuration causes significant increase in retain/release traffic. Aliasing the constants in the run function somehow works around this deoptimization.

Also the initial split of the string into 8 substrings takes 44ms!!! (I’m suspecting some king of one-time ICU initialization?)
2018-10-23 23:50:44 +02:00
Ben Cohen
4694310e51 [stdlib] Some minor cleanup (#18130)
* Remove case destructuring to _

* Remove some Iterator.Element

* Which idiot wrote this? Oh.

* Switch NibbleSort to just use default impls... shouldn't change perf
2018-07-21 17:29:57 -07:00
Max Moiseev
1dd9d61ded Move all benchmarks to use registerBenchmark and BenchmarkInfo 2017-10-03 18:04:56 -07:00
Ben Cohen
ac18e4297a Benchmarks for equating/comparing substrings (#10030)
* Benchmarks for equating/comparing substrings

* Update main.swift

* Regnerate benchmarks harness file
2017-06-01 14:52:58 -07:00
Dave Abrahams
010412ced2 [stdlib] Add Substring comparison benchmarks
This exercise reveals lots of unimplemented cases, which, when implemented, will
cause us to uncomment the disabled code.
2017-05-24 20:56:26 -07:00
Joe Shajrawi
a408803345 Revert "[stdlib] Add Substring comparison benchmarks" 2017-05-24 20:20:55 -07:00
Dave Abrahams
01e0f0aceb [stdlib] Add Substring comparison benchmarks
This reveals lots of unimplemented cases, which will cause us to uncomment the
disabled code.
2017-05-24 16:58:29 -07:00
Dave Abrahams
5a0db2f389 [stdlib] Add initial Substring benchmarks 2017-05-12 19:59:41 -07:00