Commit Graph

492 Commits

Author SHA1 Message Date
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
David Smith
f85e1fee22 Generalize the JSON perf tests to Codable 2018-12-03 11:16:47 -08:00
David Smith
c129066b39 Add simple benchmarks for JSON coding 2018-11-29 17:41:50 -08:00
Karoy Lorentey
74eaea2a6a [benchmark] Add some benchmarks for String breadcrumbs (#20769)
[benchmark] Add some benchmarks for String breadcrumbs
2018-11-28 16:24:29 -08:00
Pavol Vaskovic
0bdd3ef275 [benchmark] Equalize memory usage (w&w/o verbose)
The use of `--verbose` parameter was affecting the reported memory usage (`--memory`), because it front-loads initialization of string interpolation and printing.

By always computing the configuration string and always calling print, the baseline memory measurement no longer includes this constant overhead.
2018-11-28 21:34:12 +01:00
Andreas Jönsson
09768f29c5 [benchmark] fixes index(of:) deprecation warnings in ArgParse 2018-11-27 22:57:22 +01:00
swift-ci
f093925036 Merge pull request #20452 from Catfish-Man/stringtrampolines 2018-11-15 17:55:34 -08:00
David Smith
8bb6b78e36 Use super trampolines to let us override several more NSString methods (-UTF8String, -cStringUsingEncoding:, and -getCString:maxLength:encoding:) for performance 2018-11-15 17:10:51 -08:00
Maxim Moiseev
cbf83ac04f [NFC][stdlib] Add FIXME markers to simplify audit 2018-11-14 11:58:42 -08:00
Slava Pestov
f6c2caf64b stdlib: Add @inlinable to @inline(__always) declarations
These should be audited since some might not actually need to be
@inlinable, but for now:

- Anything public and @inline(__always) is now also @inlinable
- Anything @usableFromInline and @inline(__always) is now @inlinable
2018-11-13 15:15:07 -05:00
David Smith
634e6bc584 Add benchmarks for various ObjC NSString operations on bridged Swift Strings 2018-11-06 13:43:24 -08:00
eeckstein
f64f02bfde Merge pull request #20212 from palimondo/fluctuation-of-the-pupil
[benchmark] Legacy Factor
2018-11-06 11:31:08 -08:00
Lance Parker
7376009ccc Add benchmarks and tests for the normalized iterator (#32)
Add benchmarks and tests for the normalized iterator
2018-11-04 10:42:41 -08:00
Pavol Vaskovic
a7f832fb57 [benchmark] Legacy factor
This adds optional `legacyFactor` to the `BenchmarkInfo`, which allows for linear modification of constants that unnecesarily inflate the base workload of benchmarks, while maintaining the continuity of log-term benchmark tracking.

For example, if a benchmark uses `for _ in N*10_000` in its run function, we could lower this to `for _ in N*1_000` and adding a `legacyFactor: 10` to its `BenchmarkInfo`.

Note that this doesn’t affect the real measurements gathered from the `--verbose` output. The `BenchmarkDoctor` has been slightly adjusted to work with these real samples, therefore `Benchmark_Driver check` will not flag these benchmarks for slow run time reported in the summary, if their real runtimes fall into the recommended range.
2018-11-01 06:24:27 +01:00
eeckstein
cd920b69f4 Merge pull request #19910 from palimondo/fluctuation-of-the-pupil
[benchmark] More Robust Benchmark_Driver
2018-10-29 15:02:07 -07:00
Michael Gottesman
ba7815b663 [benchmark] Fix swiftpm based benchmark build on Linux. 2018-10-29 12:15:20 -07:00
Michael Gottesman
4d76ff9681 [benchmark] Add two benchmarks that show performance of flattening an array.
The first is a naive imperative approach using appends in a loop. The second
uses flatMap. We would like both of these to have equivalent performance.
2018-10-28 15:55:26 -07:00