Commit Graph

11 Commits

Author SHA1 Message Date
Karoy Lorentey
8910b75cfe [benchmark] Stop capitalizing function and variable names 2021-09-15 22:08:07 -07:00
Karoy Lorentey
203dc55b60 [benchmark] CheckResults → check
Capitalizing function names is against Swift naming conventions.
2021-09-15 22:08:07 -07:00
Pavol Vaskovic
5f92040224 [benchmark] Revert bigger name change
To avoid the need to mess with `lit` tests due to renamed benchmark, let's just add the customary suffix `2` for the bugfixed version. We'll fight the renaming battle another day...
2019-02-04 08:53:01 +01:00
Pavol Vaskovic
70a9adafbd Revert "Revert "[benchmark] RomanNumbers Redux"" 2019-02-04 08:45:06 +01:00
Joe Shajrawi
adfce60b2e Revert "[benchmark] RomanNumbers Redux" 2019-02-01 11:20:19 -08:00
Pavol Vaskovic
f104383529 [benchmark] RomanNumeral pared back down
Remove the extended benchmark coverage to leave only bug-fixed version of `RomanNumeral` benchmark with the new name `Roman.Substring.startsWith.dropFirst`.
2019-01-31 06:58:44 +01:00
Pavol Vaskovic
0edd560dc3 [benchmark] RomanNumbers Redux
Rewrite of the `RomanNumbers` benchmark that fixes error in the `position` which was always reset to 0 after `continue outer`, by swapping the `while` and `for-in` loops into more natural order, which eliminates the need for using `position` at all. This is based on examples from [Rosetta Code](https://www.rosettacode.org/wiki/Roman_numerals/Decode#Swift).

The coverage has been expanded to measure performance of `String`/`Substring`/`UTF8View` with very short string arguments and methods: `hasPrefix`/`starts(with:)`, `removeFirst`/`dropFirst` and `String.append()`, as well as functional variants of the fastest imperative version.

The `Roman.Substring.startsWith.dropFirst` variant tests the same code paths as the original `RomanNumbers` benchmark, but the name is changed because of the bug-fix and lowered workload (to run in less than 1000 μs).

For comparison, there's one extra variant with character based parsing algorithm: `Roman.DictCharInt.map.reduce`.
2019-01-29 22:20:03 +01:00
Chéyo Jiménez
a527e53e17 Renamed DictionaryLiteral to KeyValuePairs (#16577)
* renamed DictionaryLiteral to KeyValuePairs per SE-0214

* renamed DictionaryLiteral type tests to KeyValuePairs

* [SE-0214] Move changelog entry (Swift 4.2 => 5.0)

* [SE-0214] Update comment in AST/Expr.h

* [SE-0214] Use generic typealias

See also <https://github.com/apple/swift/pull/17711>

* [SE-0214] Update source-stability.swift.expected
2018-08-27 10:51:12 -07:00
Karoy Lorentey
28dbeb5a8b [benchmark] RomanNumbers: Use CheckResults 2018-01-08 12:30:22 +00:00
Karoy Lorentey
384cb5a659 [benchmark] RomanNumbers: Use DictionaryLiteral and enumerated(). 2018-01-05 17:05:26 +00:00
Karoy Lorentey
9e375bbce2 [benchmark] Add roman numeral conversion benchmark 2018-01-04 18:31:49 +00:00