Commit Graph

527 Commits

Author SHA1 Message Date
Erik Eckstein
ee9ad6f0da benchmarks: mark more benchmarks as unstable 2017-12-15 16:57:31 -08:00
Adam Nemet
80c9b044f6 Support opt-viewer when benchmarking in stand-alone mode
Tested locally with both stand-alone and in-tree benchmarking.
2017-12-13 21:19:22 -08:00
swift-ci
ff679109da Merge pull request #13371 from lancep/long_shared_prefix 2017-12-13 11:52:33 -08:00
Erik Eckstein
0133bfd71f benchmarks: identify more unstable benchmarks 2017-12-12 12:35:22 -08:00
Lance Parker
b446659934 Use blackHole on the comparison result 2017-12-12 10:43:25 -08:00
Adam Nemet
30cbf7e9e5 Support opt-viewer with multi-source benchmarks as well 2017-12-11 22:06:53 -08:00
Lance Parker
4ed54512d0 added benchmark for strings with long shared prefixes 2017-12-11 17:35:36 -08:00
Max Moiseev
ea02806f28 [stdlib] Conditional conformances for LazyFilterCollection
(cherry picked from commit 833721a172)
2017-12-11 10:46:25 -08:00
Graydon Hoare
62a6b74ad1 Revert "[stdlib] Conditional conformances for Lazy[Filter|Map]Collection" 2017-12-10 12:48:36 -08:00
Max Moiseev
833721a172 [stdlib] Conditional conformances for LazyFilterCollection 2017-12-08 12:52:12 -08:00
Ben Cohen
4ddac3fbbd [stdlib] Eradicate IndexDistance associated type (#12641)
* Eradicate IndexDistance associated type, replacing with Int everywhere

* Consistently use Int for ExistentialCollection’s IndexDistance type.

* Fix test for IndexDistance removal

* Remove a handful of no-longer-needed explicit types

* Add compatibility shims for non-Int index distances

* Test compatibility shim

* Move IndexDistance typealias into the Collection protocol
2017-12-08 12:00:23 -08:00
Michael Gottesman
3aa039673d [benchmark] Use String.split instead of String.components.
This allows the benchmarks to be built without the Foundation overlay being
built. I am currently prototyping having +0 parameters for all normal arguments
and have not gotten the Foundation overlay to work yet... so this commit will
let me get some initial numbers for the subset of the tests that do not depend
on Foundation.

rdar://34222540
2017-12-07 10:59:28 -08:00
anemet
20d9f21de5 Merge pull request #12938 from anemet/opt-remark-benchmark
Generate opt-view for benchmarks
2017-12-05 13:43:21 -08:00
Erik Eckstein
614c12a1d8 benchmarks: mark another benchmark as unstable 2017-12-05 09:23:19 -08:00
Erik Eckstein
9931b3c719 benchmarks: Mark some unstable benchmarks as unstable.
Which excludes them from the list of executed benchmarks.
2017-12-04 16:01:56 -08:00
Erik Eckstein
383920fc24 benchmarks: remove legacy benchmark lists in Driver
They are not used anymore.
2017-12-04 15:41:21 -08:00
Karoy Lorentey
9fef06e59c Merge pull request #12752 from hamishknight/dictionary-subscript-addressor
[stdlib] Use addressor for Dictionary's subscript(_:default:)
2017-12-04 15:04:29 +01:00
Lance Parker
4cad7535b7 Added comparison benchmarks
# Conflicts:
#	benchmark/single-source/StringComparison.swift
2017-12-01 16:54:08 -08:00
Adam Nemet
7ed42f3963 Generate opt-view for benchmarks
When the SWIFT_BENCHMARK_GENERATE_OPT_VIEW cmake flag is on, the benchmarks are
compiled with -save-optimization-record which generate optimization remarks in
external YAML files. Then the opt-viewer tool from LLVM is invoked to generate
the HTML pages that displays the remarks embedded in the source code.

I've only added it to single-source benchmarks for now.

This can be enabled by
passing --extra-cmake-options='-DSWIFT_BENCHMARK_GENERATE_OPT_VIEW=ON' to
build-script.
2017-12-01 08:51:46 -08:00
Erik Eckstein
a940cdeafb benchmarks: Rename 2 benchmarks which were fixed recently.
So that we don't compare with the (wrong) baseline
2017-11-30 15:29:29 -08:00
Hamish
f7015c2984 [stdlib] Added benchmarks for Dictionary's subscript(_:default:) 2017-11-19 15:45:27 +00:00
Karoy Lorentey
c6a4d1131e Make sure string benchmarks actually measure string operations
The optimizer was sometimes able to eliminate most/all of the actual operations, so some benchmarks were not really measuring anything.
2017-11-08 19:15:47 +00:00
Greg Parker
58c9b45c78 [runtime] Clean up symbols in StdlibUnittest and the internal leak checker.
* Export fewer symbols.
* Prefix exported but not-public symbols with `_swift_`.
2017-10-24 13:13:43 -07:00
Arnold Schwaighofer
a921bfa044 Benchmark_RuntimeLeaksRunner: don't use non-existing --run-all flag
rdar://34149935
2017-10-13 07:44:46 -07:00
Max Moiseev
c6ff6b0142 Extract setup and teardown stages for a benchmnark 2017-10-12 15:26:38 -07:00
Max Moiseev
b5492518ae [benchmark] Add LazilyFilteredArrayContains benchmark 2017-10-12 11:36:57 -07:00
eeckstein
c2afdc4b64 Merge pull request #12355 from eeckstein/remove-cr
benchmarks: remove deprecated CheckResults function
2017-10-10 08:32:43 -07:00
Erik Eckstein
46c96978b3 benchmarks: remove deprecated CheckResults function 2017-10-09 16:33:34 -07:00
Max Moiseev
5db258b5ab Merge pull request #12196 from moiseev/bench-no-characters
[benchmark] Eliminate usages of String.characters and CharacterView
2017-10-06 17:05:14 -07:00
Erik Eckstein
45a2ae48ce benchmarks: replace the Ounchecked build with an Osize build
We don't measure Ounchecked anymore. On the other hand we want to benchmark the Osize build.
2017-10-06 14:09:43 -07:00
Max Moiseev
53ec0b1168 Improve StringEdits performance in absence of CharacterView
CharacterView was not Hashable, so Set could not be used as an
accumulator. String and Substring are Hashable, but using a Set as an
accumulator is still slower than first collecting all the results in an
Array and then transforming it to a Set at the end. One possible reason
why that could be the case, is that by the time conversion happens, we
already know the capacity and thus will not re-allocate and re-hash a
Set on every insertion beyong current capacity.
2017-10-05 10:43:08 -07:00
Max Moiseev
f7f7d25c06 Go back to using Array in StringEdits benchmark 2017-10-04 15:50:34 -07:00
Max Moiseev
d88493a7a2 Apply changes to a gyb file instead of a generated result 2017-10-04 15:50:34 -07:00
Max Moiseev
ff105c5ab2 [benchmark] Eliminate usages of String.characters and CharacterView
To avoid compiler warnings.
<rdar://problem/34750654>
2017-10-04 15:50:34 -07:00
Max Moiseev
95cd5221f9 Remove a misleading comment 2017-10-04 14:54:04 -07:00
Max Moiseev
26c498c005 [benchmark] Add RangeIteration benchmarks 2017-10-04 14:50:29 -07:00
Max Moiseev
41aa4428a1 Merge pull request #12242 from moiseev/benchmarks-tags
[benchmark] Using tags for benchmarks
2017-10-04 14:46:49 -07:00
Max Moiseev
c35cd06c70 Fix a typo 2017-10-04 12:24:21 -07:00
Max Moiseev
1dd9d61ded Move all benchmarks to use registerBenchmark and BenchmarkInfo 2017-10-03 18:04:56 -07:00
Max Moiseev
86eeb5416b Introduce .skip tag and properly handle --skip-tags parameter 2017-10-03 10:07:50 -07:00
Max Moiseev
68cdba2df2 Use registerBenchmark for all benchmarks 2017-10-03 10:07:14 -07:00
Max Moiseev
528b3a0f3a [benchmark] Remove precommit/registered flags, add skipTags
The idea being, we need to decide what benchmarks to run solely based on
tags.

`--tag` allows to list all tags that are required;
`--skip-tags` allows to skip benchmarks that have any of those tags.

By default, skip-tags list contains .unstable and .String, which results
in the same subset of benchmarks as before.
2017-10-03 09:37:56 -07:00
Michael Gottesman
96bc70d6ad [benchmark] Update perf_test_driver for benchmark driver updates.
This ensures that Benchmark_GuardMalloc, Benchmark_RuntimeLeaksRunner, etc. all
support the new way benchmark --list outputs benchmark names.
2017-10-02 22:06:47 -07:00
Max Moiseev
cc723b9aff Minor refactoring 2017-10-02 17:10:44 -07:00
Michael Gottesman
48f4a276ba [benchmark] Only add -external suffix to targets in standalone builds where SWIFT_BENCHMARK_SUBCMAKE_BUILD is set.
This enables us to distinguish in between builds which are triggered by a
subcmake call from the main swift cmake file and one from a user who is trying
to compile the swift benchmark suite against a misc swift installation/use the
ninja file by hand.
2017-10-01 10:41:48 -07:00
swift-ci
a0a1a76cfe Merge pull request #12146 from gottesmm/add_support_for_initFunction 2017-09-28 11:05:52 -07:00
swift-ci
e72960cf65 Merge pull request #12160 from gottesmm/pr-0f176401f4123a30b554c1b4b3c97369359aad1d 2017-09-28 10:34:44 -07:00
Michael Gottesman
2a6b4fbb38 [benchmark] Re-add support for anding multiple tags by splitting on ','
As an example:

--tags=Array,cpubench

would select all tests that are both tagged as Array benchmarks and cpu
benchmarks.
2017-09-28 10:11:23 -07:00
Michael Gottesman
f7681a993a [benchmark] Add support for specifying a benchmark setUp and tearDown function via BenchmarkInfo.
The key thing here is that by providing one of these closures, a benchmark can
inject the initialization/deinitialization of its internal data structures,
outside of the time period where timing is occurring.

The intention is that this will provide us the framework for as we annotate
tests with BenchmarkInfo, to move initialization work out of benchmarks.

It will also allow for more complex benchmarks to be written such as ones that
perform bulk reads from a pipe (my interest in this).
2017-09-28 09:57:46 -07:00
Michael Gottesman
5cdd946734 [benchmark] Simplify how we filter tests down to 1 filter implementation.
Previously, we both filtered tests and marked tests as not being able to be run.
This commit rips out the marking of tests as being unable to be run (but counted
as part of the indices output by the compiler).

This also ensures benchmarks that are run are always given an ascending index
instead of sometimes having indices being skipped.
2017-09-28 09:43:20 -07:00