Commit Graph

1638 Commits

Author SHA1 Message Date
Max Moiseev
953d919a22 Merge branch 'master' into new-integer-protocols 2016-11-16 14:46:31 -08:00
practicalswift
ee58a8831f [gardening] Fix typos. 2016-11-15 18:05:48 +01:00
Max Moiseev
92813be403 Merge branch 'master' into new-integer-protocols 2016-11-11 16:14:57 -08:00
practicalswift
17503b0d85 [gardening] Use American English. 2016-11-06 10:12:04 +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
Max Moiseev
3d4f00091d Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-10-28 15:55:40 -07: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
Max Moiseev
c63086d594 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-10-21 15:29:55 -07:00
Erik Eckstein
bafeb39bdb cmake: make benchmarks compilable without -wmo
This only affects benchmark builds for which -whole-module-optimization is removed from BENCHOPTS in benchmark/CMakeLists.txt
2016-10-20 14:27:00 -07:00
Max Moiseev
6803cda05c Merge branch 'master' into new-integer-protocols 2016-09-26 11:39:46 -07:00
Michael Gottesman
6fd9dca2e6 [benchmark] Allow the number of test samples cmake will use to be specified from the command line.
The benchmark bot uses this functionality today to run the benchmarks. By
default build-script only uses 3 samples for each test. Given the noise on our
systems, this is definitely not sufficient for any sort of robust numbers.

Using this patch, I am going to change the benchmarking bot to take the minimum
of 20 samples as we do for our internal benchmarking. This should help make the
benchmark bot give better data. This will have as a cost cause the bot to take
more time. The testing time issue can be solved down the line by changing to a
protocol where we first do tests with a small number of samples (< 5). Then any
benchmark with a delta > 5% is rerun with 20 samples or perhaps until a
statistical criterion is satisfied. But until that is implemented, this at least
makes the bot useful.

There are other things that need to be changed on the benchmarking bot as well,
namely that it should build on a separate machine from which it is running the
benchmarks on. The benchmarking machine should be quiet and not have any work
being done on it. But that is also for another time.
2016-09-23 20:05:10 -07:00
Michael Gottesman
dc64594580 [benchmark][generate-harness] When generating the CMakeLists.txt file for the harness, sort the single-source files to give a deterministic ordering. 2016-09-23 19:16:22 -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
Michael Gottesman
ff634f6319 [benchmarks] Make generate_harness.py executable. 2016-09-23 19:10:08 -07:00
practicalswift
ef8e43b519 [gardening] Increase consistency with regards to spacing after colons 2016-09-22 16:28:57 +02:00
Max Moiseev
ea8e0f0e15 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-09-21 14:48:35 -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
swift-ci
adc55dc8e1 Merge pull request #4839 from practicalswift/a-vs-an-nssomething 2016-09-16 13:28:15 -07:00
practicalswift
89276cc07e [gardening] Replace "a NSFoo" with "an NSFoo". 2016-09-16 21:49:18 +02:00
practicalswift
ee871c7938 [python] Bring code base in line with PEP-8 again 2016-09-16 19:33:04 +02:00
Erik Eckstein
a4cc137e16 Revert "benchmarks: add missing autoreleasepool in DictionaryBridge benchmark"
This reverts commit b8d4cf6036.

autoreleasepool is no longer necessary because the optimized NSDictionary constructor:
ae22fe7f6b
2016-08-05 09:03:31 -07:00
Luke Larson
c60add3668 Stop ad-hoc signing stdlib dylibs for benchmarks
rdar://problem/27619856
2016-08-03 14:11:11 -07:00
Erik Eckstein
b8d4cf6036 benchmarks: add missing autoreleasepool in DictionaryBridge benchmark
Fixes a leak
rdar://problem/27601057
2016-08-01 15:21:32 -07:00
Erik Eckstein
304095fd7d benchmarks: Don't crash on overflow in IterateData 2016-08-01 13:50:02 -07:00
Dave Abrahams
f06a9a1154 Merge 'origin/master' into new-integer-protocols 2016-07-29 17:52:49 -07:00
Robert Widmann
4f465224ea Polish off uses of dynamicType in tests 2016-07-29 16:59:14 -07:00
Dmitri Gribenko
99dffd7682 Merge pull request #3854 from rintaro/SE-0101-memorylayout
[SE-0101] Implement: Reconfiguring sizeof and related functions into a unified MemoryLayout struct - Part 1
2016-07-29 15:56:27 -07: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
Dmitri Gribenko
e37d04854c Merge pull request #3865 from kballard/rename-data-benchmark
Rename the Data benchmark file to IterateData
2016-07-29 14:59:19 -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
David Farler
c2f12980a8 Update benchmark code for SE-0081 moved where clause - NFC 2016-07-29 11:59:58 -07:00
Rintaro Ishizaki
c6f4bcd01e [SE-0101] MemoryLayout: Migrate testsuite and benchmarks 2016-07-30 03:11:45 +09:00
Maxim Moiseev
f01bc2d394 Simplifying too complex expressions in benchmarks with type casts 2016-07-29 13:31:21 +03:00
Maxim Moiseev
1cb48c4774 fixing the benchmarks 2016-07-29 13:31:21 +03:00
Maxim Moiseev
b771fa098e IT BUILDS 2016-07-29 13:31:21 +03: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
Dmitri Gribenko
69255f02cb Merge pull request #3831 from kballard/data_iterator
Implement a custom Data.Iterator
2016-07-28 18:11:16 -07:00
Robert Widmann
4c2dbe1723 [stdlib][SE-0089] Finish off Lossless String Conversion (#3761)
* Rename string reflection init

* Addressing PR comments and updating some tests

* Update test suite for lossless string conversion
2016-07-28 17:13:25 -07:00
Kevin Ballard
742f2b4cdd Add benchmark for iterating Data 2016-07-28 11:29:17 -07:00
Dmitri Gribenko
e3ea6058bc Fix warnings in benchmarks 2016-07-28 00:56:50 -07:00
Dmitri Gribenko
a0670a2a87 benchmarks: add a benchmark for AnyHashable initialization 2016-07-27 01:14:01 -07:00
swiftix
9756755e68 Merge pull request #3758 from swiftix/SE-130-implementation
Implementation of the SE-130 proposal.
2016-07-26 22:15:13 -07:00
Roman Levenstein
a798852cb4 Implementation of the SE-130 proposal.
It replaces String initializers taking Character or UnicodeScalar as a repeating value by a more general initializer that takes a String as a repeating value. This is done to avoid the ambiguities in the current String API, which can be only resolved by explicit casting.
String.append(_:UnicodeScalar) APIs is also removed to match these changes.
2016-07-26 20:08:11 -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
Joe Groff
ea41accd90 Update benchmarks for id-as-Any. 2016-07-25 06:01:21 -07:00