Commit Graph

905 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
Ben Cohen
baa3a7dc10 [benchmarks] Add a benchmark for printing using mirrors (#32150)
* Add a benchmark for mirrors and typename->string conversion
2020-06-03 12:06:39 -07:00
Andrew Trick
c001de0359 Broaden the set of benchmarks tagged under .cpubench
These have all shown to be interesting, relevant, stable, and
optimized well enough by the compiler to be useful for cpu performance
tracking.
2020-05-18 23:43:07 -07:00
Andrew Trick
eb1ac0bfd9 Add .cpubench tag to ProtocolDispatch2 2020-05-07 15:01:04 -07:00
Pavol Vaskovic
c7524d3d9a Merge pull request #24677 from palimondo/janitor’s-last-stand
[benchmark] Janitor Duty: Final Sweep
2020-04-15 19:44:02 +02:00
Robert Widmann
80cc726ad4 Merge pull request #19954 from Lukasa/cb-bench-h2-enumeration
[benchmark] Add HTTP2StateMachine benchmark
2020-04-14 20:03:56 -07:00
brett koonce
7f0f6bbec2 rm minor warning 2020-04-09 10:08:10 -07:00
eeckstein
ecf1e4e370 Merge pull request #30822 from PatrickPijnappel/premultiply-case-conversion-benchmark
[benchmark] Premultiply N for case conversion benchmark
2020-04-08 08:26:55 +02:00
Patrick Pijnappel
6196a8a045 [benchmark] Rename premultiplied tests 2020-04-07 19:04:45 +10:00
Patrick Pijnappel
fce674efcb [benchmark] Premultiply N for case conversion benchmark 2020-04-06 15:48:12 +10:00
Patrick Pijnappel
4863d0448e [benchmark] Change selection of non-skipped ParseInt benchmarks 2020-04-06 13:22:04 +10:00
Michael Ilseman
83e5cb5bcf [benchmark] Disable inlining of wCSIA in benchmark
... which gives us a better feel for when contiguity is unknown at the
call site.
2020-04-03 14:06:12 -07:00
Michael Ilseman
e3cbb41a67 [benchmark] Add custom-collection String(decoding:as:)
Add a custom collection String(decoding:as:) benchmark for contiguous
and non-contiguous collections (overriding
withContiguousStorageIfAvailable)
2020-04-01 11:29:03 -07:00
Patrick Pijnappel
965f7e2b4a Merge pull request #29988 from PatrickPijnappel/expand-parse-int-benchmarks
[benchmark] Expand ParseInt benchmarks
2020-02-26 17:29:39 +11:00
swift-ci
573e55263c Merge pull request #30049 from gottesmm/pr-84af955fa93e4646656fdbeff3a2df1e1a5399ea 2020-02-25 18:21:35 -08:00
Michael Gottesman
583b2b00e5 [benchmark] Fix names 2020-02-25 13:53:20 -08:00
Michael Gottesman
66ece215c1 Add a version of Prims that uses Unmanaged._withUnsafeGuaranteedRef. 2020-02-25 12:33:32 -08:00
Michael Gottesman
7c5f4d8960 Add variants of PrimsNonStrongRef that use a closure access function rather than an accessor to get the underlying value.
I am going to be adding a variant of this that uses
Unmanaged._withUnsafeGuaranteedRef(...). To truly make it fair, I am
adding variants that also use an access ref entrypoint.
2020-02-25 12:33:32 -08:00
Michael Gottesman
561c76d5bb Add version of non strong ref prims that uses a closure based approach to access the value.
I am going to add a version of this that tests that Unmanaged._withUGR
gives us expected performance. So we really need both versions of all of
the four current benchmarks to make this truly fair.
2020-02-25 12:33:32 -08:00
Michael Gottesman
25233e53fd Fix small bit of incorrect code that was hiding behind an #if false. 2020-02-25 12:33:32 -08:00
Karoy Lorentey
4804425e45 [benchmark] Add regular (slow) Unmanaged variant 2020-02-25 11:25:49 -08:00
Karoy Lorentey
2e95ab90bb [benchmark] Actually deallocate nodes 🤭 2020-02-25 11:09:40 -08:00
Karoy Lorentey
3f83a233a2 [benchmark] Adjust scaling 2020-02-24 23:09:47 -08:00
Karoy Lorentey
18364013b5 [benchmark] Add RandomTree benchmark 2020-02-24 21:53:40 -08:00
Patrick Pijnappel
70ffa90083 [benchmark] Pick ParseInt skipped tests more deliberately 2020-02-22 23:23:29 +11:00
Patrick Pijnappel
c73b4ee99d [benchmark] Make ParseInt not use gyb 2020-02-22 10:07:24 +11:00
Patrick Pijnappel
973c0fdcf0 Add .skip to non-core tests 2020-02-21 22:51:51 +11:00
Patrick Pijnappel
0c60e66643 [benchmark] Fix ParseInt memory variability 2020-02-21 19:31:17 +11:00
Patrick Pijnappel
ccf38e3dc2 [benchmark] Increase ParseInt small values to ...9999 2020-02-21 19:17:20 +11:00
Patrick Pijnappel
0dae2cb9a2 [benchmark] Expand ParseInt benchmarks and use gyb 2020-02-21 18:31:41 +11:00
zoecarver
464b585c9c Update benchmark to be more similar to other devirtualization benchmarks 2020-02-06 14:14:51 -08:00
zoecarver
ea821b1adb Use blackHole to make sure benchmark isn't optimized away 2020-02-03 16:48:01 -08:00
zoecarver
dbadd99b62 Add benchmark for devirtualization performance measurements 2020-02-03 15:20:59 -08:00
Luciano Almeida
392baefc47 [stdlib][Qol] SR-11295 Removing stdlib unnecessary coercions (#27165)
* Removing unnecessary casts from stdlib

* Minor adjustments

* [stdlib][qol] Clean up error variable assign NSError

* Removing unnecessary coercions after removing DeclRefExpr restriction.
2019-12-11 07:30:25 -08:00
Cory Benfield
7e82b6fca6 [benchmark] Add HTTP2StateMachine benchmark 2019-11-19 21:10:24 +00:00
David Smith
9188dd6994 Add benchmarks for mutable copies of bridged Swift Strings 2019-11-14 14:51:02 -08:00
Michael Gottesman
9565300f1b Merge pull request #27699 from Lukasa/cb-chacha-benchmark
[benchmark] Add ChaCha20-based performance benchmark
2019-10-29 09:07:09 -07:00
David Smith
13c3894100 Merge pull request #27700 from Catfish-Man/the-place-i-was-before
Add reverse-bridging benchmarks for array subscripting
2019-10-15 18:24:23 -07:00
Cory Benfield
b43bfa88c0 [benchmark] Add ChaCha20-based performance benchmark
This patch adds a benchmark to the Swift benchmark suite based on the
ChaCha20 encryption algorithm.

As Swift evolves it is important that it tackles more and more features
and possible use cases. One of these great use-cases is low-level CPU
intensive code, and cryptographic algorithms are a really important
test-bed.

This benchmark therefore provides a real-world test case for Swift's
optimiser. My ideal outcome here is that Swift should be able to perform
as well at this benchmark as a naive equivalent C implementation.
2019-10-15 16:33:21 -07:00
David Smith
9cbed94062 Add reverse-bridging benchmarks for array subscripting 2019-10-15 11:50:38 -07:00
David Smith
f0b3003b14 Add benchmarks for creating Strings from ASCII 2019-10-14 09:23:21 -07:00
Andrew Trick
086eb07ede Merge pull request #27099 from atrick/fix-rangeiter-bench
Fix RangeIteration and StringWalk benchmarks' use of globals
2019-09-11 11:44:58 -07:00
Andrew Trick
bbc3ebc5e6 StringWalk benchmark: remove global variable access from the loop.
Global variables are being used as if they are "free black
holes". They might be even more expensive than actually calling
blackHole. But the right thing to do is use local variables and pass
them into a black hole at the end of computation.
2019-09-10 21:50:51 -07:00
Michael Gottesman
b4e25f9274 [benchmark] Add versions of prims that in a non-efficient way uses various forms of non-strong references.
Specifically, I add some benchmarks for weak, unowned, unsafe (unowned), and
unmanaged. The reason for the split in between unsafe (unowned) and unmanaged is
that one is testing the raw compiler features and the other is validating stdlib
performance.
2019-09-10 18:32:44 -07:00
Andrew Trick
6266dbae53 RangeIteration benchmark: remove global variable access from the critical path.
This benchmark was "accidentally" accessing a global variable in the
main iteration loop, which is in some situations very expensive and
has nothing to do with what the benchmark is trying to test.
2019-09-09 19:39:10 -07:00
Michael Gottesman
d128664244 Merge pull request #26744 from weissi/jw-bench-find-string
benchmark: add naive string finding
2019-08-29 19:02:04 -07:00
Johannes Weiss
f758d22ff7 benchmark: add naive string finding
FindStringNaive is a simple benchmark which implements a naive String
finding algorithm that currently shows a lot of ARC traffic, hopefully
to be reduced in the future.
2019-08-28 19:57:13 +01:00
Andrew Trick
7e9b46ee03 Add SortArrayInClass benchmark.
This currently copies the array each time it swaps elements. This
makes it 1500x slower than it should be to sort the array. The
benchmark now runs in 15ms but should be around 10us when fully
optimized.

This algorithm is an interesting optimization problem involving array
optimization, uniqueness, bounds checks, and exclusivity. But the
general first order problem is how to modify a CoW data structure
that's stored in a class property. As it stands, the property getter
retains the class property around the modify accesses that checks
uniqueness.
2019-08-15 16:32:37 -07:00
Pavol Vaskovic
22d7c289be Merge pull request #25310 from keitaito/string-benchmarks
[benchmark] Add ReplaceSubrange benchmark
2019-08-03 01:04:26 +02:00