Commit Graph

492 Commits

Author SHA1 Message Date
zoecarver
f3bb988ea0 [nfc] [cxx-interop] Disable ReadAccessor benchmark. 2022-04-29 10:18:10 -07:00
Josh Soref
fa3ff899a9 Spelling benchmark (#42457)
* spelling: approximate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: available

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: benchmarks

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: between

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: calculation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: characterization

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: coefficient

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: computation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: deterministic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: divisor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: encounter

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: expected

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: fibonacci

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: fulfill

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: implements

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: into

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: intrinsic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: markdown

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: measure

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: occurrences

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: omitted

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: partition

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: performance

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: practice

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: preemptive

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: repeated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: requirements

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: requires

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: response

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: supports

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unknown

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: utilities

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: verbose

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-25 09:02:06 -07:00
Erik Eckstein
1fceeab71e benchmarks: prevent some functions from being cross-module optimized.
Function bodies of `blackHole`, `identity`, etc. must not be visible in the benchmark modules.
Enabling CMO by default broke this. Since then we need to explicitly exclude those functions from cross-module-optimization.
2022-04-19 13:59:56 +02:00
Daniel Duan
3dfc40898c [NFC] Remove Python 2 imports from __future__ (#42086)
The `__future__` we relied on is now,  where the 3 specific things are
all included [since Python 3.0](https://docs.python.org/3/library/__future__.html):

* absolute_import
* print_function
* unicode_literals
* division

These import statements are no-ops and are no longer necessary.
2022-04-13 14:01:30 -07:00
Nuri Amari
cda2c26d8c Create ReadAccessor benchmark
Create a benchmark to test the
performance of synthesized read
accessors generated to interop
with C++ [] operators.
2022-03-07 10:19:25 -05:00
BenedictSt
fdb05626c7 Fixed typo: desciption -> description
benchmark/utils/ArgParse.swift

desciption -> description
2022-01-05 11:18:04 +01:00
Karoy Lorentey
8304e6c0bf Merge pull request #39336 from lorentey/decapitate-benchmarks
[benchmark][NFC] Use Swift naming conventions
2021-09-20 17:16:35 -07:00
Karoy Lorentey
758c52bc2a [benchmark] Don't create array instance in modules with solitary benchmarks
It just produces unnecessary code sign churn.
2021-09-16 18:54:14 -07:00
Karoy Lorentey
6cf798cd6d [benchmark] Trap if deterministic hashing isn't enabled 2021-09-16 16:57:06 -07:00
Karoy Lorentey
8944591e71 [benchmark] Simplify benchmark registration 2021-09-15 22:08:08 -07:00
Karoy Lorentey
8910b75cfe [benchmark] Stop capitalizing function and variable names 2021-09-15 22:08:07 -07:00
Karoy Lorentey
958733c812 [benchmark] False() → getFalse() 2021-09-15 22:08:07 -07:00
Karoy Lorentey
bd9a22099a [benchmark] Random(), SRand() → LFSR.init(), .next() 2021-09-15 22:08:07 -07:00
Karoy Lorentey
203dc55b60 [benchmark] CheckResults → check
Capitalizing function names is against Swift naming conventions.
2021-09-15 22:08:07 -07:00
David Smith
376c0293fe Merge pull request #38818 from Catfish-Man/home-home-on-the-rangeofstring
Add benchmarks exercizing bridged rangeOfString more thoroughly
2021-08-10 00:16:31 -07:00
David Smith
847047e867 Add benchmarks exercizing bridged rangeOfString more thoroughly in preparation for adding a native version 2021-08-09 16:18:28 -07:00
Guillaume Lessard
314220ff07 benchmarks of performance when filling memory buffers 2021-07-28 01:58:33 -06:00
Stephen Canon
9ddbd56d32 Simd random mask benchmark (#36579)
* Add benchmark for SIMDMask.random generation.

* Add bitcast for IntN -> VecNxInt1
2021-03-25 08:54:40 -04:00
Stephen Canon
13812776cc Some initial benchmarks for simd integer arithmetic. 2021-03-19 11:19:35 -04:00
Michael Ilseman
73af20fdbf [benchmark] Add StringSplitting and lines benchmarks
Add a new benchmark module StringSplitting for split-like benchmarking.

Add lineSink benchmarks, which separates Unicode content by lines and feeds
Strings into a sink.
2021-03-04 17:20:12 -07:00
Ikko Ashimine
473e4af90a [benchmark] Fix typo in DriverUtils.swift
reseting -> resetting
2021-01-14 01:50:21 +09:00
zoecarver
388c2ffff8 [nfc] Add header guards and "requres cplusplus" to C++ benchmarks. 2021-01-08 15:47:49 -08:00
zoecarver
cbfe358065 [benchmark] Add "StringSwitch" benchmark to match "StringEnum".
This benchmark compares 184 strings in a string-based switch statement.
This will be used to test #28260.
2021-01-04 11:33:57 -08:00
Richard Wei
b8581cb83b [AutoDiff] Add differentiation benchmarks (#34901)
* Add differentiation benchmarks.
* Make install name of _Differentiation be @rpath/libswift_Differentiation.dylib.

Co-authored-by: Marc Rasi <marcrasi@google.com>
2020-12-02 12:26:31 -08:00
Zoe Carver
aa04872a16 Merge pull request #32721 from zoecarver/cxx/benchmark/create-objects
[cxx-interop] Add support for benchmarks with C++ interop.
2020-11-20 07:58:16 -08:00
Micah Benn
71784065cb Add IndexPath benchmarks
Add benchmarks for subscripts, max, min
2020-11-01 08:39:51 -06:00
zoecarver
01b12cfe6e [cxx-interop] Add support for benchmarks with C++ interop.
* Adds support for benchmarks that use C++ modules.
* Adds "CreateObjects" benchmark that creates C++ objects.
2020-10-06 19:33:22 -07:00
Xiaodi Wu
65a547c4e6 [benchmark] Add new benchmark for floating-point conversion 2020-09-04 13:42:47 -04:00
Mike Ash
60e12f109d Add a benchmark for protocol conformance testing. 2020-08-14 15:32:51 -04:00
Robert Widmann
cddf73ecdb [Gardening] Clean Up OS-Test Patterns Across The Codebase
Clean up a few general patterns that are now obviated by canImport

This aligns more generally with the cleanup that the Swift Package
Manager has already done in their automated XCTest-plumbing tool in
apple/swift-package-manager#1826.
2020-06-30 22:55:58 -07:00
Ben Cohen
baa3a7dc10 [benchmarks] Add a benchmark for printing using mirrors (#32150)
* Add a benchmark for mirrors and typename->string conversion
2020-06-03 12:06:39 -07:00
Patrick Pijnappel
ca9185deeb [benchmark] Revert removal of InsertCharacter & IntegerParsing 2020-04-26 19:26:40 +10:00
Robert Widmann
80cc726ad4 Merge pull request #19954 from Lukasa/cb-bench-h2-enumeration
[benchmark] Add HTTP2StateMachine benchmark
2020-04-14 20:03:56 -07:00
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
7e82b6fca6 [benchmark] Add HTTP2StateMachine benchmark 2019-11-19 21:10:24 +00: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