Commit Graph

492 Commits

Author SHA1 Message Date
Michael Ilseman
86e353a682 Revert "Try disabling CSV benchmarks to see if that unsticks PR benchmark runs" 2018-01-29 11:49:00 -08:00
ben-cohen
3c87fe0b20 Try disabling CSV benchmarks to see if that unsticks PR benchmark runs 2018-01-28 08:39:49 +00:00
Max Moiseev
ea38221ce6 Merge pull request #14043 from xwu/benchmark-doublewidth-division
[benchmark] Add DoubleWidth division benchmark
2018-01-22 12:54:29 -08:00
Michael Ilseman
010d48598f Merge pull request #14049 from milseman/csvparsing
[benchmark] Add two new CSVParsing alternative benchmarks.
2018-01-21 21:57:54 -08:00
Michael Ilseman
7e58fd2cb5 [benchmark] Add two new CSVParsing alternative benchmarks.
The first is copied from https://github.com/apple/swift/pull/13930's
contribution (with a minor bug fix applied). The second is an
adaptation that tries to avoid creating copies and operate using
indices directly.
2018-01-21 18:07:07 -08:00
Michael Ilseman
3be2faf5d3 [String] Initial implementation of 64-bit StringGuts.
Include the initial implementation of _StringGuts, a 2-word
replacement for _LegacyStringCore. 64-bit Darwin supported, 32-bit and
Linux support in subsequent commits.
2018-01-21 12:32:26 -08:00
Xiaodi Wu
bc0e80634e [benchmark] Add DoubleWidth division benchmark 2018-01-20 23:59:17 -06:00
Xiaodi Wu
3887c59bb8 Add binary floating-point conversion benchmark 2018-01-15 16:11:19 -06:00
Michael Ilseman
d9fa4f5d0d [benchmark] More CharacterProperty variations 2018-01-08 13:05:23 -08:00
Karoy Lorentey
548878f733 Merge pull request #13731 from lorentey/romannumbers
[benchmark] Add roman numeral conversion benchmark
2018-01-08 19:27:11 +00:00
Karoy Lorentey
3312a22c1a Merge pull request #13725 from lorentey/wordcount
[benchmark] Add word counting benchmarks
2018-01-08 14:46:15 +00:00
Karoy Lorentey
6098fa4ac4 [benchmark] Add word counting benchmarks 2018-01-08 12:00:21 +00:00
Max Moiseev
861df1cdf9 Merge pull request #13770 from moiseev/pointer-arith-bench
[benchmark] Add a microbenchmark for the UnsafePointer.+
2018-01-06 16:42:03 -08:00
Michael Gottesman
24027067b9 [benchmarks] Add some more benchmarks by our very own airspeedswift.
With his permission of course.
2018-01-06 01:15:37 -05:00
Michael Ilseman
5eb699978a Merge pull request #13759 from milseman/csv_benchmarks
[benchmark] Hook up CSVParsing to suite
2018-01-05 21:22:05 -08:00
Max Moiseev
11f8f4c485 [benchmark] Add a microbenchmark for the UnsafePointer.+
UnsafePointer implementation contains the following note:

> Note: The following family of operator overloads are redundant with
Strideable. However, optimizer improvements are needed before they can
be removed without affecting performance.

... but it looks like there is no benchmark to support this claim.
2018-01-05 18:00:18 -08:00
Michael Ilseman
1eaf1f5571 [benchmark] Hook up CSVParsing to suite 2018-01-05 13:43:46 -08:00
Michael Ilseman
1c2954b133 [benchmark] Add a CharacterProperties benchmark 2018-01-05 11:27:36 -08:00
Karoy Lorentey
9e375bbce2 [benchmark] Add roman numeral conversion benchmark 2018-01-04 18:31:49 +00: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
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
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
Erik Eckstein
46c96978b3 benchmarks: remove deprecated CheckResults function 2017-10-09 16:33: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
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
Max Moiseev
cc723b9aff Minor refactoring 2017-10-02 17:10:44 -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
Michael Gottesman
37c8052494 [benchmark] Change DriverUtils.Test to contain a BenchmarkInfo struct instead of destructuring a BenchmarkInfo.
This will allow me to add support for running an initFunction before running
samples.
2017-09-27 12:46:38 -07:00
Michael Gottesman
8a69de7332 [benchmark] Have legacy tests use BenchmarkInfo and combine this with registered benches.
*NOTE* We always prefer a registered benchmark if we have one.

I am going to use BenchmarkInfo to solve the "create data for benchmark while we
are already timing" problem. I am going to add a field to BenchmarkInfo that if
it is not-null is called before we start measuring time. This closure can be
used to initialize any global data structures/etc.

But to do this, I need to be able to combine the registered and legacy
not-registered benchmarks.
2017-09-27 12:46:38 -07:00
Andrew Trick
a4f4b72e4e Stip .abstraction tag from most benchmarks.
Only use the .abstraction tag for benchmarks that are primarilly stressing the
optimization of a specific kind of abstraction. Then I can use these as CPU
benchmarks.

Previously this tag was applied to any benchmark that happened to involve
classes or protocols. When a compiler engineer changes something that might
affect codegen in these cases, they should simply benchmark the entire stable
suite. There's no value in having a separate set of 97 "abstraction" benchmarks
that are primarilly testing something else, like a stdlib API.
2017-09-27 11:06:10 -07:00
Michael Gottesman
f1e6e86a9e [benchmark] Eliminate a multiple ternary operator in favor of a closure.
These are really hard to read naively.
2017-09-27 10:02:07 -07:00
Michael Gottesman
77acbe82b7 [benchmark] Rename BenchmarkCategories => BenchmarkCategory.
This is an enum that represents a single category of benchmarks. Per the API
guidelines this should really be singular.
2017-09-26 19:28:34 -07:00
Michael Gottesman
45b1609c23 [benchmark] Make BenchmarkCategories a StringEnum.
This ensures that we get BenchmarkCategories <-> String for free and enables the
code that implemented that transform to be deleted.
2017-09-26 19:28:05 -07:00
Michael Gottesman
d7f4c99696 [benchmark] Update DriverUtils to match the API guidelines closer. 2017-09-26 19:04:22 -07:00
Michael Gottesman
d6c6ba722a [benchmark] Add some comments to BenchmarkInfo's properties. 2017-09-26 19:04:22 -07:00
Michael Gottesman
7a188c6039 [benchmark] Add PrimsSplit a multi source version of the Prims benchmark.
This will enable us to at least validate on swift.org that the multisource
benchmark stuff is working.

rdar://34556274
2017-09-25 19:27:56 -07:00
Andrew Trick
7a4adbe980 Fix enum indentation. 2017-09-22 21:44:05 -07:00