UnsafePointer implementation contains the following note:
> Note: The following family of operator overloads are redundant with
Strideable. However, optimizer improvements are needed before they can
be removed without affecting performance.
... but it looks like there is no benchmark to support this claim.
SE-0054 disallowed nesting IUO types within other types. We currently
give a warning for this, but eventually we'll either emit an error or
interpret the '!' as '?' (a plain optional).
Either way, this particular benchmark doesn't test anything different
than the one that uses plain optionals, so we should be able to remove it.
* Eradicate IndexDistance associated type, replacing with Int everywhere
* Consistently use Int for ExistentialCollection’s IndexDistance type.
* Fix test for IndexDistance removal
* Remove a handful of no-longer-needed explicit types
* Add compatibility shims for non-Int index distances
* Test compatibility shim
* Move IndexDistance typealias into the Collection protocol
This allows the benchmarks to be built without the Foundation overlay being
built. I am currently prototyping having +0 parameters for all normal arguments
and have not gotten the Foundation overlay to work yet... so this commit will
let me get some initial numbers for the subset of the tests that do not depend
on Foundation.
rdar://34222540
When the SWIFT_BENCHMARK_GENERATE_OPT_VIEW cmake flag is on, the benchmarks are
compiled with -save-optimization-record which generate optimization remarks in
external YAML files. Then the opt-viewer tool from LLVM is invoked to generate
the HTML pages that displays the remarks embedded in the source code.
I've only added it to single-source benchmarks for now.
This can be enabled by
passing --extra-cmake-options='-DSWIFT_BENCHMARK_GENERATE_OPT_VIEW=ON' to
build-script.
CharacterView was not Hashable, so Set could not be used as an
accumulator. String and Substring are Hashable, but using a Set as an
accumulator is still slower than first collecting all the results in an
Array and then transforming it to a Set at the end. One possible reason
why that could be the case, is that by the time conversion happens, we
already know the capacity and thus will not re-allocate and re-hash a
Set on every insertion beyong current capacity.