Skip to content

Commit 81b6af1

Browse files
authored
---
yaml --- r: 341425 b: refs/heads/rxwei-patch-1 c: 878433e h: refs/heads/master i: 341423: 11bf61f
1 parent 679ff26 commit 81b6af1

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: 0c4859fd2f950a80b89d45139554ed9f26ac2825
1018+
refs/heads/rxwei-patch-1: 878433eee661fba1df4483a11e48d23422c2be92
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/benchmark/single-source/AngryPhonebook.swift

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let t: [BenchmarkCategory] = [.validation, .api, .String]
2020
public let AngryPhonebook = [
2121
BenchmarkInfo(
2222
name: "AngryPhonebook",
23-
runFunction: { angryPhonebook($0, words) },
23+
runFunction: run_AngryPhonebook,
2424
tags: t,
2525
legacyFactor: 7),
2626
BenchmarkInfo(
@@ -47,19 +47,31 @@ let words = [
4747
"Joshua", "Kevin", "Ronald", "Timothy", "Jason", "Jeffrey", "Gary", "Ryan",
4848
"Nicholas", "Eric", "Stephen", "Jacob", "Larry", "Frank"]
4949

50+
@inline(never)
51+
public func run_AngryPhonebook(_ N: Int) {
52+
// Permute the names.
53+
for _ in 1...N {
54+
for firstname in words {
55+
for lastname in words {
56+
_ = (firstname.uppercased(), lastname.lowercased())
57+
}
58+
}
59+
}
60+
}
61+
5062
// Workloads for various scripts. Always 20 names for 400 pairings.
5163
// To keep the performance of various scripts roughly comparable, aim for
5264
// a total length of approximately 120 characters.
5365
// E.g.: `latin.joined(separator: "").count == 124`
5466

5567
let latin = Array(words.prefix(20))
5668

57-
let armenian: [String] = [
69+
let armenian = [
5870
"Արմեն", "Աննա", "Հարութ", "Միքայել", "Մարիա", "Դավիթ", "Վարդան",
5971
"Նարինե", "Տիգրան", "Տաթևիկ", "Թագուհի", "Թամարա", "Ազնաուր", "Գրիգոր",
6072
"Կոմիտաս", "Հայկ", "Գառնիկ", "Վահրամ", "Վահագն", "Գևորգ"]
6173

62-
let cyrillic: [String] = [
74+
let cyrillic = [
6375
"Ульяна", "Аркадий", "Аня", "Даниил", "Дмитрий", "Эдуард", "Юрій", "Давид",
6476
"Анна", "Дмитрий", "Евгений", "Борис", "Ксения", "Артур", "Аполлон",
6577
"Соломон", "Николай", "Кристи", "Надежда", "Спартак"]

0 commit comments

Comments
 (0)