Commit Graph

1659 Commits

Author SHA1 Message Date
Alex Lorenz
46342302ff [interop] cxx vector sum benchmark - reduce iterations to avoid long times for slow runs 2022-10-10 09:14:40 -07:00
Alex Lorenz
2a07c1c8ce [interop] benchmark: add run_CxxVectorOfU32_Sum_Swift_RawIteratorLoop that doesn't use C++ inline helpers 2022-10-10 09:13:32 -07:00
Alex Lorenz
157be05c97 [interop] rewrite the C++ vector sum benchmark to have clear naming and take iter into account 2022-10-10 09:13:31 -07:00
Alex Lorenz
d72b592eeb [cxx-interop] Add initial benchmark to compare vector<uint32_t> sum in C++ vs Swift 2022-10-10 09:13:31 -07:00
Dario Rexin
992cae456b [Frontend] Use experimental feature for layout prespecializations (#61451) 2022-10-06 15:21:01 -07:00
Alex Lorenz
e659a52f46 [interop] mark C++ benchmarks with cxxInterop tag for easy local testing 2022-10-03 17:13:10 -07:00
Dario Rexin
25e547e30d [Build] Fix flag in benchmark build 2022-09-22 20:45:11 -07:00
Dario Rexin
210c68d8aa [SILOptimizer] Add prespecialization for arbitray reference types (#58846)
* [SILOptimizer] Add prespecialization for arbitray reference types

* Fix benchmark Package.swift

* Move SimpleArray to utils

* Fix multiple indirect result case

* Remove leftover code from previous attempt

* Fix test after rebase

* Move code to compute type replacements to SpecializedFunction

* Fix ownership when OSSA is enabled

* Fixes after rebase

* Changes after rebasing

* Add feature flag for layout pre-specialization

* Fix pre_specialize-macos.swift

* Add compiler flag to benchmark build

* Fix benchmark SwiftPM flags
2022-09-22 16:29:01 -07:00
Tim Kientzle
48c1931c78 Unbreak delta reporting in benchmarks (#61236)
The logic here was apparently intended to omit literal zeros from deltas
to save a few bytes, but it instead drops all zeros from all columns.
Remove the condition that drops zeros in order to avoid confusing
the many scripts that consume this data.

Alternatives Considered

I'm probably going to entirely drop the delta form in an upcoming
PR, so I didn't think it was worthwhile to do something more complex,
such as:

* Fixing this logic to only omit zeros from actual delta columns

* Rewriting all the client scripts to treat any empty column as zero
2022-09-22 10:22:16 -07:00
Robert Widmann
af9c1bb56f Merge pull request #60770 from YOCKOW/W291
[Gardening] Remove trailing whitespaces in Python scripts. (W291)
2022-08-25 17:23:58 -07:00
YOCKOW
c1e154a9cb [Gardening] Remove trailing whitespaces in Python scripts. (W291)
That has been marked as 'FIXME' for three years.
This commit fixes it.
2022-08-25 16:08:36 +09:00
fibrechannelscsi
730bf24035 Add benchmarks that measure KeyPath read and write performance. (#60383)
* Add benchmarks that measure KeyPath read and write performance.

* Added setUpFunctions. Revised number of iterations per benchmark.

* Include n as a factor in the number of iterations.

* Increased number of iterations for KeyPathDirectAccess by a factor of 25.

* One last tweak to the number of iterations on testDirectAccess to get them above 20 us.

* Made revisions based on feedback. Added three new benchmarks.

* Added benchmarks to exhaustively benchmark all KeyPathComponent types. Removed benchmarks dealing with an inlining issue.

* Wrapped additional keypaths with identity() where needed. More cleanup and documentation.

* Moved KeyPaths for KeyPathRead and Write into FixedSizeArrayHolder. Renamed GetSet to Getset.

* Added inline(never) to both versions of getKeypathToElement().

* Moved identity() wraps so that they're called once per variable per benchmark.

* Moving destinationKeyPaths into FixedSizeArrayHolder to try to reduce long setup overhead errors.

* Additional moving of the identity() wrapping into the singleton's init() to try to reduce setup time errors.
2022-08-24 13:55:05 -05:00
Dario Rexin
4c484af381 [Benchmarks] Disable a few noisy Array benchmarks (#60705) 2022-08-22 13:18:52 -07:00
Mishal Shah
196ee143c5 Xcode 14 beta 4 no longer supports iOS armv7, armv7s, and i386 architectures
> Building iOS projects with deployment targets for the armv7, armv7s, and i386 architectures is no longer supported. (92831716)
2022-08-02 20:42:08 -07:00
Erik Eckstein
5c82b8c32f benchmarks: fix some benchmark unstabilities
* disable unstable benchmark `ArrayPlusEqualArrayOfInt`
* scale (by renaming) `SubstringFromLongStringGeneric` by 10
2022-07-25 14:55:42 +02:00
Lily
2eb22789d9 Add benchmarks to measure Dictionary.filter (#59264)
* Add benchmarks for dictionary filtering
2022-06-09 12:04:44 -07:00
Andrew Trick
f09cc8cc8b Fix compare_perf_tests.py for running locally.
The script defaulted to a mode that no one uses without checking
whether the input was compatible with that mode.

This is the script used for run-to-run comparison of benchmark
results. The in-tree benchmarks happened to work with the script only
because of a fragile string comparison burried deep within the
script. Other out-of-tree benchmark scripts that generate results were
silently broken when using this script for comparison.
2022-05-12 16:50:32 -07:00
Zoe Carver
448dd5990d Merge pull request #58533 from zoecarver/disable-benchmark
[nfc] [cxx-interop] Disable `ReadAccessor` benchmark.
2022-04-29 13:07:53 -07:00
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
Erik Eckstein
fb65284995 benchmarks: fix run_smoke_bench after upgrading to python3
Need to decode result of `subprocess.check_output`
2022-04-19 13:59:55 +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
zoecarver
839839f924 [cxx-interop] Rename enable-cxx-interop -> enable-experimental-cxx-interop.
Also removes the driver flag, this will now also always be guarded on `-Xfrontend`.
2022-04-07 19:15:25 -07:00
Daniel Duan
06a04624a6 [benchmark] Remove Python 2 logic (#42048)
Found a few pieces of Python 2 code. Remove them since we are on Python
3 entirely.
2022-03-27 15:02:58 -07:00
Egor Zhdan
626eadcf64 [cxx-interop] Import size_t as Int instead of UInt on Linux
When using libc++, Swift imports `size_t` as Int despite `size_t` being an unsigned type. This is intentional & is specified in `lib/ClangImporter/MappedTypes.def`. Previously, MappedTypes were only honored for C/C++ types declared on the file level.

In libstdc++, `size_t` is declared within `namespace std` and not on the file level, so the mapping to Int was not applied.

This change ensures that MappedTypes are also applied to types declared in `namespace std`.
2022-03-24 15:29:19 +00:00
Nate Chandler
1a0cd33ca0 [Benchmark] Shortened local var lifetime. 2022-03-16 20:45:40 -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
David Smith
c1957a3993 Add a benchmark for CFStringInlineBuffer on bridged Strings 2022-03-04 13:09:29 -08:00
swift-ci
32a967f1ea Merge pull request #39171 from eltociear/patch-22 2022-01-13 07:01:02 -08:00
冀卓疌
8ef5e9e0e3 Merge pull request #40706 from eltociear/patch-27
[benchmark] Fix typo in SIMDReduceInteger.swift
2022-01-13 16:15:01 +08:00
BenedictSt
fdb05626c7 Fixed typo: desciption -> description
benchmark/utils/ArgParse.swift

desciption -> description
2022-01-05 11:18:04 +01:00
Ikko Ashimine
085a9bb06a [benchmark] Fix typo in SIMDReduceInteger.swift
Intialize -> Initialize
2021-12-26 14:37:12 +09:00
Erik Eckstein
43506a01f1 cmake: fix dependencies in benchmarks
with libswift the compiler invocation also depends on the core libraries, because the compiler executable needs them.

rdar://85911944
2021-12-02 19:57:35 +01:00
Michael Gottesman
81e20fb9cb Remove @_assemblyVision marker that snuck into ChaCha.
I think I was using this as part of a demo at some point and it snuck into
tree.
2021-11-14 11:28:37 -08:00
Evan Wilde
6956b7c5c9 Replace /usr/bin/python with /usr/env/python
/usr/bin/python doesn't exist on ubuntu 20.04 causing tests to fail.
I've updated the shebangs everywhere to use `/usr/bin/env python`
instead.
2021-09-28 10:05:05 -07:00
Erik Eckstein
4447fe0cb0 benchmarks: Fix an integer overflow problem in the MapReduce benchmarks on 32-bit targets 2021-09-22 20:22:50 +02:00
Erik Eckstein
5ff6308e05 benchmarks: disable some unstable benchmarks
and scale a substring test
2021-09-22 08:39:06 +02: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
386ae586e5 [benchmark] Document deterministic hashing requirement 2021-09-16 20:23:47 -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
110d123731 [benchmark] Fix silly thinkos in Ackermann & Fibonacci 2021-09-16 18:00:37 -07:00
Karoy Lorentey
ec0fbc0d4b [benchmark] Use swift-darwin-postprocess.py to work around dyld 4 issue on macOS 12 2021-09-16 16:58:13 -07:00
Karoy Lorentey
2fbf391b57 [benchmark] Benchmark_Driver: Correctly set SWIFT_DETERMINISTIC_HASHING 2021-09-16 16:57:35 -07:00
Karoy Lorentey
6cf798cd6d [benchmark] Trap if deterministic hashing isn't enabled 2021-09-16 16:57:06 -07:00
Karoy Lorentey
ee34b02b30 [benchmark] Fixup expected output in MirrorTest after module rename 2021-09-16 16:12:00 -07:00
Karoy Lorentey
526527e587 [benchmark] Regenerate gyb 2021-09-16 12:12:39 -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