The performance regression that occurred when ++ and -- were added as
requirements to the Index protocols was due to the fact that it caused a
dubious hack of mine to be bypassed: when treated as indices, integer
types are incremented and decremented without overflow checking. While
technically justifiable (see the r20576 commit message), this makes the
standard library extremely fragile and makes successor() and
predecessor() mathematically unsafe. We really should see what the
optimizer team can do to make that hack unnecessary.
In the meantime, instead of dispatching through ++ and --, use a
special, defaulted _[successor|predecessor]InPlace() method to give
indices their own, customizable in-place inc/dec-rement path.
Swift SVN r26926
We don't specify -parse-stdlib when we compile SwiftExperimental. The debug
configuration in the library will therefore depend on how the library was build.
The test relies on a _debugPrecondition firing. It will not fire if
SwiftExperimental was built optimized.
rdar://20260634
Swift SVN r26498