Commit Graph

1659 Commits

Author SHA1 Message Date
Alex Hoppen
c3ded9a035 Revert "[cxx-interop] Create benchmarks for using std::span in Swift" 2024-09-03 18:03:54 -07:00
Susana Monteiro
c7e33f1068 Merge pull request #76207 from swiftlang/susmonteiro/cxx-span-benchmarks
[cxx-interop] pass `-std=c++20` to configurations using `std::span`
2024-09-03 10:19:07 +01:00
smonteiro2
282b1ba942 [cxx-interop] pass -std=c++20 to configurations using std::span
When the benchmarks are built with SwiftPM, the -std=c++20 flag is passed if the -cxx-interoperability-mode is present. This patch switches from -Xfrontend -enable-experimental-cxx-interop to the required interoperability flag.
2024-09-02 18:53:31 +01:00
smonteiro2
796ccb7df0 [cxx-interop] Create benchmarks for using std::span in Swift
* swift-ci linux tests do not support std::span
2024-08-30 16:39:57 +01:00
Ben Langmuir
ad82d86041 Bump the deployment target for the compiler to macOS 13.0
Bump the deployment target from macOS 10.13-aligned versions to macOS
13.0-aligned versions. This allows us to stop linking CoreFoundation
in the swift runtime, which was previously required for availability
checking. It also lets us align the deployment target on x86_64 with
arm64, which was 11.0. Finally, it is a prerequisite to being able to
build swift using the macOS 15 beta SDKs.
2024-08-29 14:30:09 -07:00
Erik Eckstein
2960f472a7 fix the swift library code size comparison in the run_smoke_bench script
In some configurations the script mixed up the build architectures and accidentally reported the code size difference between the x86 and arm.
2024-08-05 11:03:24 +02:00
Egor Zhdan
7bdd9dd84a [cxx-interop] Enable benchmarks in SwiftPM mode
The C++ interop benchmarks were only running when building with CMake, not with SwiftPM, because of a bug that was only triggering with SwiftPM. That bug seems to be fixed now.
2024-07-24 13:38:38 +01:00
Egor Zhdan
f1ca417da6 [cxx-interop] Run benchmarks in C++20 mode
This will allow benchmarking Swift access to `std::span` which is a C++20 feature and therefore requires compiling with `-Xcc -std=c++20`.
2024-07-23 12:30:17 +01:00
Egor Zhdan
cb2bd5aeaf Merge pull request #75373 from swiftlang/egorzhdan/reenable-benchmarks
[cxx-interop] Re-enable benchmarks
2024-07-19 20:27:18 +01:00
Egor Zhdan
0bfd5722d4 [cxx-interop] Re-enable benchmarks
This adds an `import CxxStdlib` statement which fixes compilation. It should be redundant, but it works around a bug that got exposed by an change in explicit modules (rdar://128520766).

This will bring back the performance numbers while the underlying issue is being investigated.
2024-07-19 17:15:46 +01:00
David Smith
a861fc117b Add benchmarks for withContiguousStorageIfAvailable on bridged NSArrays (#75215) 2024-07-16 00:24:23 -07:00
Alexander Cyon
cb55dbbb96 Fix typo 'defne' -> 'define'. 2024-07-07 18:22:14 +02:00
Alexander Cyon
9d04bfd848 [benchmark] Fix typos 2024-07-06 13:17:13 +02:00
Karoy Lorentey
ad3d3ad045 [benchmark] Update/fix availability checks 2024-06-13 18:00:45 -07:00
David Smith
5b81405a75 Add new benchmarks for UTF16 transcoding (#74229) 2024-06-08 15:21:22 -07:00
Nate Chandler
88c5fc17b2 [Benchmark] Disable Cxx{VectorSum,SetToCollection}.
The two benchmarks don't currently build in some configurations.  Also
disabled building ReadAccessor whose running had previously been
disabled because it doesn't build anymore.

rdar://128520766
2024-06-06 07:23:37 -07:00
Mykola Pokhylets
6298d41edf Reapply "Fix quadratic performance of the ListMerger in specific usage pattern"
This reverts commit 2640ff613b.
2024-05-30 13:08:42 +02:00
Andrew Trick
2640ff613b Revert "Fix quadratic performance of the ListMerger in specific usage pattern" 2024-05-21 16:23:57 -07:00
Mykola Pokhylets
69f54501d4 Added benchmark for adding jobs to default actor when visiting a tree 2024-05-10 11:05:22 +02:00
Nate Cook
38e1370884 Revert "Revert count(where:)" (#70816)
* Revert "Revert count(where:)"

This reverts commit 779ea19a6a.

Now that SE-0220 has been re-accepted, this adds the `count(where:)` 
Sequence method to the standard library.
2024-03-29 13:53:53 -05:00
eeckstein
d1ec089c72 Merge pull request #72088 from language-core/main
chore: fix some comments
2024-03-06 10:08:50 +01:00
Guillaume Lessard
3aea3a0842 Merge pull request #71867 from oscbyspro/better-create-benchmark-script
Some create_benchmark.py script enhancements.
2024-03-05 12:16:25 -08:00
cui fliter
127077b3aa chore: fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-03-05 17:23:22 +08:00
Oscar Byström Ericsson
bd2abc6cde Some create_benchmark.py script enhancements (v3).
This patch is held at linterpoint. Here's the ransom.
2024-02-25 11:22:51 +01:00
Guillaume Lessard
7ed54c903c Merge pull request #71786 from oscbyspro/better-joined-distance-from-to-benchmarks
FlattenSequence/distance(from:to:) benchmarks.
2024-02-24 16:59:25 -08:00
Oscar Byström Ericsson
783a9c6a77 Some create_benchmark.py script enhancements (v2). 2024-02-24 10:40:06 +01:00
Oscar Byström Ericsson
5b8ce67a3d Some create_benchmark.py script enhancements.
This commit addresses some trials and tribulations I encountered while working on (#71786). It:

1. fixes the auto-registration regex
2. fixes the auto-generated array's name
3. generates the current year for the license header
4. generates some dashes for the license header
2024-02-24 10:15:34 +01:00
Oscar Byström Ericsson
8cfbb62a2e FlattenSequence/distance(from:to:) benchmarks (v7).
The benchmarks took too long to perform, so I reduced the size of each payload.
2024-02-24 08:18:33 +01:00
Oscar Byström Ericsson
7ecb987ad5 FlattenSequence/distance(from:to:) benchmarks (v6).
1. The auto-generated [BenchmarkInfo] was given the wrong name.
2024-02-23 10:11:18 +01:00
Oscar Byström Ericsson
cef7c43daf FlattenSequence/distance(from:to:) benchmarks (v5).
1. Replaced occurrences of Repeated<T> with Array<T>.
2024-02-22 20:45:03 +01:00
Oscar Byström Ericsson
dff27479bf FlattenSequence/distance(from:to:) benchmarks (v4).
1. Added some sequential tests with String as the inner collection.
2024-02-22 17:31:28 +01:00
Oscar Byström Ericsson
6829f808a0 FlattenSequence/distance(from:to:) benchmarks (v3).
1. Parameterized benchmark dependencies, per code review.
2024-02-22 17:25:29 +01:00
Oscar Byström Ericsson
e6cc57f321 FlattenSequence/distance(from:to:) benchmarks (v2).
1. Registered the new benchmarks in benchmark/utils/main.swift.
2024-02-22 10:11:41 +01:00
Oscar Byström Ericsson
0ea89852da FlattenSequence/distance(from:to:) benchmarks (#71648). 2024-02-21 17:33:30 +01:00
David Smith
f1feba0e42 Eytzingerize word break data (#71731)
Switch word break property searching to Eytzinger binary search
2024-02-20 22:49:34 -08:00
Egor Zhdan
2b7e470d5d Revert "[cxx-interop] benchmark, disable ReadAccessor benchmark while investigating build regression after rebranch"
This reverts commit 157632fd9f.
2023-12-26 17:49:07 +00:00
Alex Lorenz
157632fd9f [cxx-interop] benchmark, disable ReadAccessor benchmark while investigating build regression after rebranch 2023-10-24 15:21:04 -07:00
Tim Kientzle
134bd20a4d Merge pull request #68719 from tbkka/tbkka-rdar114966309-HTTP2StateMachine
Fix HTTP2StateMachine benchmark
2023-09-25 17:29:44 -07:00
Tim Kientzle
e3e72fc21c Update benchmark test script to correctly verify the --min-samples=2 default command-line arg 2023-09-25 11:57:34 -07:00
Tim Kientzle
dc7a3d38cd Fix HTTP2StateMachine benchmark
The optimizer managed to eliminate this entire benchmark,
resulting in useless 0 second timings.

I made a couple of changes to ensure the optimizer cannot
eliminate the loop:
* The individual checks now actually use the loop parameter
* `identity()` is used to ensure conservatism

While here, I reduced the loop count since these benchmarks seem
to run for a long time.
2023-09-22 17:50:51 -07:00
Tim Kientzle
7052de9399 Fix build-script -B
Without additional options, build-script -B was badly broken:
* It added a broken --independent-samples option to the driver command line
* Slow tests that ran only 1 sample by default would break the statistics

Fix the first issue by adding `--independent-samples` to the command
line only when a sample was actually provided by other options.

Fix the second issue by including `--min-samples=2` in the command.
2023-09-22 17:44:42 -07:00
Erik Eckstein
8953d686ad benchmarks: use dedicated module-cache directory for building the benchmarks
So that it cannot interfere with some leftovers from other compiler runs.
This is important for SDK modules which are generated from swiftinterface files (like Foundation).
The cached SDK module should be built with the compiler to benchmark (and not being reused from other compiler runs).
2023-09-18 18:24:52 +02:00
Manu
02b5fa2c8e Fix some typos in the codebase 2023-08-31 18:50:10 -03:00
Stéphan Kochen
7b460ce495 build: fix accidental cmake expansions
As of CMake 3.25, there are now global variables `LINUX=1`, `ANDROID=1`,
etc. These conflict with expressions that used these names as unquoted
strings in positions where CMake accepts 'variable|string', for example:

- `if(sdk STREQUAL LINUX)` would fail, because `LINUX` is now defined and
  expands to 1, where it would previously coerce to a string.

- `if(${sdk} STREQUAL "LINUX")` would fail if `sdk=LINUX`, because the
  left-hand side expands twice.

In this patch, I looked for a number of patterns to fix up, sometimes a
little defensively:

- Quoted right-hand side of `STREQUAL` where I was confident it was
  intended to be a string literal.

- Removed manual variable expansion on left-hand side of `STREQUAL`,
  `MATCHES` and `IN_LIST` where I was confident it was unintended.

Fixes #65028.
2023-07-17 21:50:50 +02:00
Max Desiatov
21a2b78801 stdlib/benchmark: add canImport(Musl) where needed (#67120)
This allows compiling stdlib and benchmarks when targeting musl instead of Glibc.
2023-07-05 19:55:08 +01:00
Lucy Satheesan
942ea60af4 [benchmark] bump minimum OS versions 2023-06-16 12:18:55 -07:00
Lucy Satheesan
32745c3c56 [benchmark] half Array.removeAll bench size 2023-05-23 21:10:11 -07:00
Lucy Satheesan
6a1129f68a [benchmark] rename Array.removeAll benchmarks 2023-05-23 17:10:32 -07:00
Lucy Satheesan
008ed2fa95 [benchmark] clean up setup for ArrayRemoveAll 2023-05-23 14:14:14 -07:00
Lucy Satheesan
d489ba2740 [benchmark] check results only once in ArrayRemoveAll 2023-05-23 11:22:47 -07:00