Commit Graph

75 Commits

Author SHA1 Message Date
Ben Cohen
95988dd29d Add benchmarks for appending UTF8 String views to an array 2017-02-06 14:14:49 -08:00
Ben Cohen
0d39d07efe add more benchmarks of map/reduce 2017-01-27 17:58:55 -08:00
Tony Allevato
9c07eb6534 Add benchmarks for initializing Characters from literals. 2017-01-17 21:35:37 -08:00
Ben Ng
3e718d3a26 Add benchmarks for += in ArrayAppend 2017-01-11 22:11:31 -05:00
practicalswift
30a88d38e6 [gardening] Fix recently introduced typos 2017-01-06 21:16:02 +01:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Nate Cook
e56bf42acb Update generate_harness.py templates
These templates had gotten slightly out of date through
manual edits. These changes make it so that running
generate_harness.py actually generates the desired files.

Changes to the non-template files are a result of the script's
alphabetization.
2017-01-04 22:26:02 -06:00
Roman Levenstein
ad0948a110 Merge pull request #6512 from djwbrown/djwbrown-reversed-benchmarks-only
[benchmark][prespecialize] Add benchmarks only for reversed iteration.
2017-01-04 19:38:19 -08:00
Dylan Brown
4355443f90 [benchmark][prespecialize] Add benchmarks only for reversed iteration.
Added ReversedCollections.swift to benchmark/single-source for
benchmarking of iterations through reversed collection types.
2016-12-30 20:26:54 +02:00
Nate Cook
95730e8726 [benchmark] Add test for sorting an already sorted array 2016-12-24 01:17:51 -06:00
ben-cohen
18487b4e71 new tests to benchmark main.swift 2016-12-18 19:31:30 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Karoly Lorentey
d751b83054 [benchmark][SR-3106] Add benchmarks implementing Observers four different ways
These benchmarks highlight optimization opportunities in the implementation
of partially applied methods and escaping closures.

  # TEST                      SAMPLES MIN(μs) MAX(μs) MEAN(μs) SD(μs) MEDIAN(μs) MAX_RSS(B)
 97 ObserverClosure                10    2547    2752     2599      0       2599  308317798
 98 ObserverForwarderStruct        10    1345    1972     1480      0       1480  614535987
 99 ObserverPartiallyAppliedMethod 10    3953    4194     4049      0       4049  267670733
100 ObserverUnappliedMethod        10    2990    3482     3093      0       3093  338796544
2016-11-01 22:27:08 +01:00
Ben Cohen
edbc41dc54 expanding append(contentsOf:) benchmarks 2016-10-28 09:47:50 -07:00
Ben Cohen
79f1880ca5 Add simple benchmark for append(contentsOf:) 2016-10-24 17:05:00 -07:00
Michael Gottesman
6c97be8eb6 [benchmark] Sort tests so that after generate_harness.py is rerun we do not get a diff due to sorting differences. 2016-09-23 19:12:00 -07:00
practicalswift
fa7fbdb8b0 [gardening] Remove redundant nil-initialization of optional variable
From the Swift documentation:

"If you define an optional variable without providing a default value,
 the variable is automatically set to nil for you."
2016-09-18 07:40:07 +02:00
Doug Gregor
8219d4f42b Merge pull request #3853 from milseman/noescape_by_default
SE-0103 Noescape by default
2016-07-29 15:27:52 -07:00
Michael Ilseman
25ac879aea [noescape by default] Fix benchmarks and incorporate feedback
Adds @escaping to internal benchmark code to fix it. References SR for
known limitation. Use stdlib coding style for arguments.
2016-07-29 13:49:08 -07:00
Kevin Ballard
01c0a7f44a Rename the Data benchmark file to IterateData
This matches the actual name of the benchmark.
2016-07-29 13:10:39 -07:00
Kevin Ballard
49b50bc5ba Add benchmark for iterating Data 2016-07-28 18:44:20 -07:00
Ted Kremenek
4a872ed636 Revert "Implement a custom Data.Iterator" (#3848) 2016-07-28 18:33:31 -07:00
Kevin Ballard
742f2b4cdd Add benchmark for iterating Data 2016-07-28 11:29:17 -07:00
Dmitri Gribenko
a0670a2a87 benchmarks: add a benchmark for AnyHashable initialization 2016-07-27 01:14:01 -07:00
Andrew Trick
a18d490d6a Migrate from UnsafePointer<Void> to UnsafeRawPointer. (#3773)
* Migrate from `UnsafePointer<Void>` to `UnsafeRawPointer`.

As proposed in SE-0107: UnsafeRawPointer.

`void*` imports as `UnsafeMutableRawPointer`.
`const void*` imports as `UnsafeRawPointer`.

Occurrences of `UnsafePointer<Void>` are replaced with UnsafeRawPointer.

* Migrate overlays from UnsafePointer<Void> to UnsafeRawPointer.

This requires explicit memory binding in several places,
particularly in NSData and CoreAudio.

* Fix a bunch of test cases for Void->Raw migration.

* qsort takes IUO values

* Bridge `Unsafe[Mutable]RawPointer as `void [const] *`.

* Parse #dsohandle as UnsafeMutableRawPointer

* Update a bunch of test cases for Void->Raw migration.

* Trivial fix for the SceneKit test case.

* Add an UnsafeRawPointer self initializer.

This is unfortunately necessary for assignment between types imported from C.

* Tiny simplification of the initializer.
2016-07-26 14:21:15 -07:00
Andrew Trick
0ed9ee8dee Revert "Migrate from UnsafePointer<Void> to UnsafeRawPointer. (#3724)"
This reverts commit ece0951924.

This results in lldb failues on linux that I can't readily debug.
Backing out until they can be resolved.
2016-07-26 02:50:57 -07:00
Andrew Trick
ece0951924 Migrate from UnsafePointer<Void> to UnsafeRawPointer. (#3724)
* Migrate from `UnsafePointer<Void>` to `UnsafeRawPointer`.

As proposed in SE-0107: UnsafeRawPointer.

`void*` imports as `UnsafeMutableRawPointer`.
`const void*` imports as `UnsafeRawPointer`.

Occurrences of `UnsafePointer<Void>` are replaced with UnsafeRawPointer.

* Migrate overlays from UnsafePointer<Void> to UnsafeRawPointer.

This requires explicit memory binding in several places,
particularly in NSData and CoreAudio.

* Fix a bunch of test cases for Void->Raw migration.

* qsort takes IUO values

* Bridge `Unsafe[Mutable]RawPointer as `void [const] *`.

* Parse #dsohandle as UnsafeMutableRawPointer

* Update a bunch of test cases for Void->Raw migration.

* Trivial fix for the SceneKit test case.

* Add an UnsafeRawPointer self initializer.

This is unfortunately necessary for assignment between types imported from C.

* Tiny simplification of the initializer.
2016-07-26 02:18:21 -07:00
Tony Parker
f65c1390cb Rename Process to CommandLine
Rename Process to CommandLine [SE-0086].
2016-07-18 17:02:02 -07:00
practicalswift
808b539f10 [gardening] Minor syntax cleanups. 2016-07-09 13:27:57 +02:00
Mishal Shah
87b7bcfd3e Update master to build with Xcode 8 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-06-14 14:53:55 -07:00
Chris Willmore
af0c7bd620 Initial implementation of SE-0054 "Abolish IUO Type" (#2322)
This is a squash of the following commits:

* [SE-0054] Import function pointer arg, return types, typedefs as optional

IUOs are only allowed on function decl arguments and return types, so
don't import typedefs or function pointer args or return types as IUO.

* [SE-0054] Only allow IUOs in function arg and result type.

When validating a TypeRepr, raise a diagnostic if an IUO is found
anywhere other thn the top level or as a function parameter or return
tpye.

* [SE-0054] Disable inference of IUOs by default

When considering a constraint of the form '$T1 is convertible to T!',
generate potential bindings 'T' and 'T?' for $T1, but not 'T!'. This
prevents variables without explicit type information from ending up with
IUO type. It also prevents implicit instantiation of functions and types
with IUO type arguments.

* [SE-0054] Remove the -disable-infer-iuos flag.

* Add nonnull annotations to ObjectiveCTests.h in benchmark suite.
2016-05-03 14:06:19 -07:00
Arnold Schwaighofer
aa34aceaee Add a benchmark to test comparing equal strings 2016-04-20 09:15:41 -07:00
Arnold Schwaighofer
5122bfb711 Add a unicode version of the SortStrings benchmark 2016-04-19 14:16:27 -07:00
Arnold Schwaighofer
2520703f58 Add String.hasPrefix/hasSuffix benchmark 2016-04-19 08:15:23 -07:00
practicalswift
dc6c2aeef6 [gardening] "Type->Type" → "Type -> Type" in Swift code 2016-04-13 23:03:55 +02:00
Dave Abrahams
1c3d998951 Revert "[gardening] "Type->Type" → "Type -> Type" in Swift code"
This reverts commit 14edeaf67a because
it's breaking tests:
https://ci.swift.org/job/oss-swift-incremental-RA-osx/lastFailedBuild/consoleFull#1361088108ee1a197b-acac-4b17-83cf-a53b95139a76
2016-04-13 10:29:57 -07:00
practicalswift
14edeaf67a [gardening] "Type->Type" → "Type -> Type" in Swift code 2016-04-13 10:51:53 +02:00
Chris Willmore
a4484ffa09 Fix use of String.componentsSeparated(by:) in benchmark. 2016-04-07 23:39:23 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Arnold Schwaighofer
1d2643b93f Support performance testing with automatic bridging disabled. 2016-03-29 15:14:36 -07:00
practicalswift
a942bb76d0 [gardening] Fix formatting of recently introduced headers. 2016-03-19 00:37:37 +01:00
Arnold Schwaighofer
50c048d7e9 Add ObjectiveC bridging stub test support
This allows for testing the autogenerated bridging stub code.
2016-03-17 13:42:36 -07:00
Arnold Schwaighofer
5ea595a5d4 Add Objective-C bridging tests for NSString, NSArray, NSDictionary, NSSet
The tests test conditional and forced bridging from objective-c and bridging to
objective-c.
2016-03-16 15:16:45 -07:00
practicalswift
1edb62dc38 [Python] Make flake8 linting pass without errors/warning (w/ default rules) 2016-03-13 20:19:51 +01:00
Arnold Schwaighofer
ee3e7a58b3 [benchmark] Add versions of the set tests with class element types 2016-03-13 08:58:59 -07:00
Arnold Schwaighofer
191b3c87a1 [benchmark] Add RGBHistogramOfObjects
Another dictionary benchmark with objects as key and value types.
2016-03-13 08:45:30 -07:00
Arnold Schwaighofer
548ba33e1d [benchmark] Add DictionarySwapOfObjects
Another dictionary benchmark with objects as key and value types.
2016-03-13 08:28:58 -07:00
Arnold Schwaighofer
4e43f745cd [benchmark] Add DictionaryRemoveOfObjects
Another dictionary benchmark with objects as key and value types.
2016-03-13 08:23:36 -07:00
Arnold Schwaighofer
f6a1926c8c [benchmark] Add Dictionary3OfObjects
Another dictionary benchmark with objects as key and value types.
2016-03-13 08:13:06 -07:00
Arnold Schwaighofer
577b0f2230 [benchmark] Add Dictionary2OfObjects
Another dictionary benchmark with objects as key and value types.
2016-03-13 08:03:41 -07:00