Commit Graph

408 Commits

Author SHA1 Message Date
Mishal Shah
95dbb9b498 Rename module.map to module.modulemap to support SwiftPM 2020-03-24 14:34:13 -07:00
Karoy Lorentey
18364013b5 [benchmark] Add RandomTree benchmark 2020-02-24 21:53:40 -08: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
dbadd99b62 Add benchmark for devirtualization performance measurements 2020-02-03 15:20:59 -08:00
Mao ZiJun
d1259cec50 eliminated "dangling pointer" warnings 2019-12-09 17:41:20 +09: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
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
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
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
5571b83353 [benchmark] Driver: log measurement metadata
Added --meta option to log measurement metadata:

* PAGES – number of memory pages used
* ICS – number of involuntary context switches
* YIELD – number of voluntary yields

(Pages and ICS were previously available only in --verbose mode.)
2019-07-23 17:40:45 +02:00
Scott Perry
3e2e4f8b6f Clean up the Diffing and Diffing.Myers benchmarks 2019-07-16 14:39:16 -07:00
Pavol Vaskovic
ec32140aed [benchmark] Run benchmarks using substring filters
Added support for running benchmarks using substring filters. Positional arguments prefixed with a single + or - sign are interpreted as benchmark name filters.

Excecutes all benchmarks whose names include any of the strings prefixed with a plus sign but none of the strings prefixed with a minus sign.
2019-07-07 11:59:45 +02:00
Pavol Vaskovic
ad24ca4ba6 [benchmark] Add min-sample argument to drivers
Support for gathering a minimal number of samples per benchmark, using the optional `--min-samples` argument, which overrides the automatically computed number of samples per `sample-time` if this is lower.
2019-07-07 10:13:26 +02:00
Scott Perry
f994fc3f80 Merge pull request #25808 from numist/numist/diffing-performance-master
Performance improvements and availability updates for Collection.difference(from:using:)
2019-07-01 14:20:07 -07:00
Pavol Vaskovic
5190db0acd [Gardening][benchmark] Import MSVCRT on Windows
Import functions from standard C library on Windows.
2019-07-01 16:11:55 +02:00
Keita Ito
4c0ea56e1b Add benchmarks for String.replaceSubrange(_:with:) with Repeated<Character> 2019-06-30 13:27:46 -07:00
Pavol Vaskovic
7c951410f4 [Gardening] Remove extra Foundation imports
Remove the import of Foundation where it is not necessary for testing the ObjC interop.
2019-06-28 16:42:27 +02:00
Scott Perry
0fc5d6ad31 Performance improvements and availability updates for Collection.difference(from:using:) 2019-06-26 16:55:29 -07:00
Keita Ito
459861b1d4 Rename ReplaceSubrange to StringReplaceSubrange 2019-06-11 00:03:21 -07:00
Keita Ito
0f6d56c9e6 Add ReplaceSubrange benchmark 2019-06-07 16:36:06 -07:00
Johannes Weiss
7226dca81f benchmark: NIOChannelPipeline imitation
adds a benchmark that imitates SwiftNIO's ChannelPipeline. Recently,
Swift master regressed on this benchmark, therefore I believe adding it
to Swift provides value as it seems to be different enough to the existing
benchmarks.
2019-05-14 21:03:03 +01:00
Patrick Pijnappel
150bcb0503 [benchmark] Add integer parsing benchmarks 2019-05-04 09:17:42 +10:00
Pavol Vaskovic
ea80003b0c Merge pull request #24307 from palimondo/legacy-factor-doc
[benchmark] Documentation for legacyFactor
2019-04-29 08:02:53 +02:00
Pavol Vaskovic
6ca706eb1d Merge pull request #24357 from palimondo/prng-splitmix64
[benchmark] Add SplitMix64 PRNG
2019-04-29 06:53:21 +02:00
Pavol Vaskovic
d2a47db71a [benchmark] Add SplitMix64 PRNG
Very fast pseudorandom number generator with 64 bits of state, conforming to `RandomNumberGenerator` protocol, passing BigCrush.
2019-04-28 19:23:42 +02:00
Pavol Vaskovic
e779e06ba2 [benchmark] Documentation for legacyFactor 2019-04-28 18:23:01 +02:00
Raj Barik
34fbbcc842 Merge pull request #24206 from rajbarik/raj-bench
Performance Benchmarking of ExistentialSpecializer
2019-04-26 08:55:29 -07:00
Michael Ilseman
2022b5c566 Merge pull request #24210 from troughton/floating-point-parsing-benchmark
[benchmark] Add a benchmark for floating point parsing performance
2019-04-25 15:13:38 -07:00
Raj Barik
2f32778de4 Performance Benchmarking of ExistentialSpecializer 2019-04-25 10:38:36 -07:00
Thomas Roughton
4b50c3ef3e [benchmark] Add a benchmark for floating point parsing performance 2019-04-24 13:31:23 +12:00
Michael Ilseman
32a2031a19 [benchmark] View variants for CSVParsing
Generalize CSVParsing so that it can be ran across all of String's
views, and add corresponding benchmarks.

Note: This does change the profile of the original benchmark, which
was an odd mixture of String and UTF16View.
2019-04-22 15:37:53 -07:00
Michael Gottesman
115f7a43e0 Move build_script_helper from ./benchmarks/utils => ./benchmarks/scripts. 2019-04-10 22:18:50 -07:00
Michael Gottesman
df539948d5 [benchmarks] Add support for building the benchmarks via build-script against the just created toolchain.
Now one can on Darwin/Linux build the benchmarks via swiftpm from build-script by passing in:

```
build-script $NORMAL_ARGS --install-swift --install-swiftpm --install-llbuild --toolchain-benchmarks --swiftpm --llbuild
```

This is done using the infrastructure that BenL added for sourcekit-lsp.
2019-04-07 13:25:31 -07:00
David Smith
d2a59e0edf Add new benchmarks for NSString bridging to cover non-tagged cases 2019-03-21 14:17:39 -07:00
Patrick Pijnappel
06a2e6d5d2 [test] Add Range overlaps benchmark 2019-03-14 20:26:28 +11:00
Pavol Vaskovic
539f2cdcdf [benchmark] Remove DoubleWidthDivision (dead code) 2019-03-01 20:40:18 +01:00
Pavol Vaskovic
40cce2da3d Merge pull request #22707 from palimondo/within-one-stem
[benchmark] Move fake autoreleasepool to TestUtils
2019-02-20 12:35:26 +01:00
Pavol Vaskovic
7896909d23 [benchmark] Move fake autoreleasepool to TestUtils
This workaround for writing cross platform benchmarks is required in multiple performance tests.
2019-02-19 07:50:12 +01:00
Pavol Vaskovic
16af31a39b [benchmark] Remove HashQuadratic
This was obsoleted by DictionaryCopy.
2019-02-17 07:09:14 +01:00
Pavol Vaskovic
0ac591e27b [benchmark] Add .existential BenchmarkCategory 2019-02-06 12:38:50 +01:00
Ben Cohen
779ea19a6a Revert count(where:) 2019-01-31 18:57:17 -08:00
Patrick Balestra
fecff67e3e [benchmark] Sort registerBenchmark statements alphabetically 2019-01-20 22:00:26 +01:00
Lance Parker
15aaa1e777 [stdlib]String normalization functions (#21026)
* fast/foreignNormalize functions
2019-01-08 13:55:29 -08:00
Pavol Vaskovic
ec836bd04b Merge pull request #20861 from palimondo/a-tall-white-fountain-played
[benchmark] Janitor Duty, Legacy Factor: A-C
2018-12-07 19:49:06 +01:00
Pavol Vaskovic
9d6f7ad160 [benchmark] Driver & Doctor: Lower the sample cap
Lowered the default sample cap from 2k to 200. (This doesn’t effect manually specified `--num-samples` argument in the driver.)

Swift benchmarks have pretty constant performance profile over time. It’s more beneficial to get multiple independent measurements faster, than more samples from the same run.
2018-12-07 15:06:43 +01:00