Commit Graph

1638 Commits

Author SHA1 Message Date
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
Andrew Trick
14862908ef Merge pull request #28043 from zoecarver/fix/substitution-map-composition
Devirtualize calls to protocol composition type methods
2020-02-18 09:30:07 -08:00
Ross Bayer
b1961745e0 [Python: black] Reformatted the benchmark Python sources using utils/python_format.py. 2020-02-08 15:32:44 -08:00
zoecarver
464b585c9c Update benchmark to be more similar to other devirtualization benchmarks 2020-02-06 14:14:51 -08:00
Vedant Kumar
609c84b600 benchmark: Make building with debug info the default (#29669) 2020-02-06 11:03:20 -08:00
zoecarver
134792947e Merge branch 'master' into fix/substitution-map-composition 2020-02-04 16:18:03 -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
Michael Gottesman
2840a7609d When gathering counters, check for instability and FAIL otherwise.
The way we already gather numbers for this test is that we run two runs of
`Benchmark_O $TEST` with num-samples=2, iters={2,3}. Under the assumption that
the only difference in counter numbers can be caused by that extra iteration,
subtracting the group of counts for 2,3 gives us the number of counts in that
iteration.

In certain cases, I have found that a small subset of the benchmarks are
producing weird output and I haven't had the time to look into why. That being
said, I do know what these weird results look like, so in this commit we do some
extra validation work to see if we need to fail a test due to instability.

The specific validation is that:

1. We perform another run with num-samples=2, iter=5 and subtract the iter=3
counts from that. Under the assumption that overall work should increase
linearly with iteration size in our benchmarks, we check if the counts are
actual 2x.

2. If either `result[iter=3] - result[iter=2]` or `result[iter=5] -
result[iter=3]` is negative. All of the counters we gather should never decrease
with iteration count.
2020-01-15 14:41:21 -08:00
Michael Gottesman
461f17e5b7 Change -csv flag to be --emit-csv. 2020-01-15 14:41:21 -08:00
Michael Gottesman
35aa0405d1 Pattern match test names, not numbers to capture test names from Benchmark_O --list
This makes the output of the test more readable.
2020-01-15 14:41:21 -08:00
Michael Gottesman
676411f0b0 Have dtrace aggregate rr opts and start tracking {retain,release}_n.
Otherwise, one can get results that seem to imply more rr traffic when in
reality, one was not tracking {retain,release}_n that as a result of better
optimization become just simple retain, release.
2020-01-15 14:39:55 -08:00
Michael Gottesman
6fff30c122 [benchmark-dtrace] Enabling multiprocessing option to speed up gathering data. 2020-01-08 16:06:56 -08:00
Michael Gottesman
c7c2e6e17b [benchmark-dtrace] Fix the amount of samples taken along side the number of iters.
Otherwise, the output is not stable.
2020-01-08 16:06:56 -08:00
Michael Gottesman
d48cdd9cad [benchmark-dtrace] Set SWIFT_DETERMINISTIC_HASHING=1 before calling subjobs.
This prevents a bunch of instability in the retain, release numbers. I am still
getting some of it, but this helps a lot.
2020-01-08 16:06:56 -08:00
Hamish Knight
bc62c141c0 Eliminated "dangling pointer" warnings at DriverUtils (#28648)
Eliminated "dangling pointer" warnings at DriverUtils
2019-12-16 12:54:21 -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
Mao ZiJun
d1259cec50 eliminated "dangling pointer" warnings 2019-12-09 17:41:20 +09:00
Michael Gottesman
33684ba508 Add support for compiling ObjectiveCNoBridgingStubs to the swiftpm benchmark build.
We did not have access to something like SwiftSettings.unsafeFlags to
pass -disable-swift-bridge-attr to swift.
2019-11-26 10:00:08 -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
Alex Hoppen
932525d762 [gardening] Fix several python-lint warnings 2019-10-29 10:40:20 -07:00
Alex Hoppen
776e2c0030 Revert "Migrate building SwiftSyntax to swift_build_support" 2019-10-29 09:55:32 -07: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
Alex Hoppen
46501b881f [gardening] Fix several python-lint warnings 2019-10-25 15:58:07 -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
d7d903f7d1 Merge pull request #27665 from Catfish-Man/starring-ascii-as-itself
Add benchmarks for creating Strings from ASCII
2019-10-14 16:06:49 -07:00
David Smith
f0b3003b14 Add benchmarks for creating Strings from ASCII 2019-10-14 09:23:21 -07:00
Erik Eckstein
81a5c0f479 run_smoke_bench: make num_retries configurable 2019-10-14 11:37:42 +02: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
swift-ci
b7acc6d2ef Merge pull request #26522 from atrick/fix-bench-docs 2019-08-24 18:15:12 -07: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
Andrew Trick
878814de64 Cleanup the directions for building benchmarks. 2019-08-06 14:37:56 -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
Pavol Vaskovic
a9cbe2bf87 [benchmark] String.replaceSubrange: multiplier fix
+[Gardening] minor formatting (80 chars)
2019-08-02 22:55:50 +02:00
Keita Ito
b76169c6e0 Update the PR by addressing feedback
- Re-name benchmark names
- Remove setupLargeManagedString()
- Remove unnecessary optimization barrier functions
- Update benchmark argument string by using smallString and largeString
- Remove unnecessary optimization barrier function calls
- Update replaceSubrange(_:_:with) to be generic function
2019-07-28 11:24:40 -07:00
Pavol Vaskovic
4c45b51411 Merge pull request #26303 from palimondo/baby-driver
[benchmark] Driver Improvements
2019-07-24 09:05:42 +02:00
Pavol Vaskovic
cc0e16ca34 [benchmark] LogParser: measurement metadata 2019-07-23 19:44:41 +02:00