* switch var to let in benchmark directory
* Revert "switch var to let in benchmark directory"
This reverts commit 6133471e76.
* change gyb files to fix error
Mask the setup overhead from copying of existential array in `Existential.Array.Mutating` by increasing the workload (5x). This way the overhead of copying is less than 5%.
Remove the misguided attempt at solving this problem with `grabArray` method - there is no way to avoid this overhead because every sample should start from a fresh copy.
Increased workload to sorting of 10k items.
Used SplitMix64 PRNG for randomness.
Adjusted formatting and naming to match Swift conventions.
Adjusted documentation.
Generalize CSVParsing so that it can be ran across all of String's
views, and add corresponding benchmarks.
Note: This does change the profile of the original benchmark, which
was an odd mixture of String and UTF16View.
This will let me:
1. Add -Osize support easily.
2. Put all of the binaries in the same directory so that Benchmark_Driver can
work with them via the -tools argument.
Cleanup and document the configuration of the library path and rpath.
With SWIFT_BENCHMARK_USE_OS_LIBRARIES, it's now possible to directly
build benchmarks for a target device and run those benchmarks on the
device without building or installing Swift.
It's also possible now to specify an absolute SWIFT_LIBRARY_PATH to be
used as an rpath so installation can be skipped.
Now one can on Darwin/Linux build the benchmarks via swiftpm from build-script by passing in:
```
build-script $NORMAL_ARGS --install-swift --install-swiftpm --install-llbuild --toolchain-benchmarks --swiftpm --llbuild
```
This is done using the infrastructure that BenL added for sourcekit-lsp.
I also removed the -verify-sil-ownership flag in favor of a disable flag
-disable-sil-ownership-verifier. I used this on only two tests that still need
work to get them to pass with ownership, but whose problems are well understood,
small corner cases. I am going to fix them in follow on commits. I detail them
below:
1. SILOptimizer/definite_init_inout_super_init.swift. This is a test case where
DI is supposed to error. The only problem is that we crash before we error since
the code emitting by SILGen to trigger this error does not pass ownership
invariants. I have spoken with JoeG about this and he suggested that I fix this
earlier in the compiler. Since we do not run the ownership verifier without
asserts enabled, this should not affect compiler users. Given that it has
triggered DI errors previously I think it is safe to disable ownership here.
2. PrintAsObjC/extensions.swift. In this case, the signature generated by type
lowering for one of the thunks here uses an unsafe +0 return value instead of
doing an autorelease return. The ownership checker rightly flags this leak. This
is going to require either an AST level change or a change to TypeLowering. I
think it is safe to turn this off since it is such a corner case that it was
found by a test that has nothing to do with it.
rdar://43398898
I have been meaning to do this change for a minute, but kept on putting it off.
This describes what is actually happening and is a better name for the option.
The build was not specifying the vendor when building the Darwin
benchmarks. Parts of the SDK rely on the vendor macro (`__APPLE__`) to
be defined which requires that the vendor is specified properly. Ensure
that we do so.