Commit Graph

1643 Commits

Author SHA1 Message Date
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
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
LucianoAlmeida
c3c1e6df8d [Benchmarks][stdlib] Adding an extra benchmark for set isDisjoint for disjoint sets of different size 2021-09-12 21:56:54 -03:00
Ikko Ashimine
c48f6e09bb [benchmark] Fix typo in compare_perf_tests.py
formating -> formatting
2021-09-04 09:10:34 +09:00
swift-ci
65244f042f Merge pull request #38827 from glessard/buffer-benchmarks 2021-08-12 17:08:16 -07:00
Guillaume Lessard
49ae2dd64b Update benchmark/single-source/BufferFill.swift
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
2021-08-12 12:49:25 -06:00
Guillaume Lessard
e06d03e860 [benchmark] initialize an UMBP<UInt8> from an URBP 2021-08-10 18:33:46 -06: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
15b55bfe4b Rename and rescale benchmarks 2021-08-09 17:59:03 -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
swift-ci
a92acc72c7 Merge pull request #38621 from glessard/buffer-benchmarks 2021-07-28 12:00:16 -07:00
Guillaume Lessard
210ade36d6 add a reference to a bugs.swift.org report 2021-07-28 10:15:29 -06:00
Guillaume Lessard
314220ff07 benchmarks of performance when filling memory buffers 2021-07-28 01:58:33 -06:00
Michael Gottesman
f432bd9416 Merge pull request #36094 from zoecarver/bump-cmake-req
Bump CMake version to 3.19.6.
2021-07-24 15:37:18 -07:00
Guillaume Lessard
715b3fa7d0 [gardening] update copyright year in the benchmark template 2021-07-22 16:39:15 -06:00
zoecarver
a13c57c360 Bump CMake version to 3.19.6.
Updates the CMake version for Swift and the Swift Benchmarks to 3.19.6.
Updates the docs to reflect this change. Does not modify the required version for building the stdlib.
2021-07-12 08:57:35 -07:00