Skip to content

Benchmark {Float,Double,Float80}.description #15234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented Mar 14, 2018

This just tests how fast we can produce .description for the standard floating-point types. It also includes a benchmark that actually does something with the result, to check whether future optimizations to the creation of the string accidentally pessimize use of the results.

tbkka added 2 commits March 9, 2018 13:50
This just tests how fast we can format the standard
floating-point types.  It also includes a test that
uses the result, to ensure that future optimized
_creation_ of the string doesn't incidentally pessimize
_use_ of the results.
This just tests how fast we can format the standard
floating-point types.  It also includes a test that
uses the result, to ensure that future optimized
_creation_ of the string doesn't incidentally pessimize
_use_ of the results.
@tbkka tbkka requested a review from milseman March 14, 2018 14:32
@tbkka
Copy link
Contributor Author

tbkka commented Mar 14, 2018

In particular, I'd appreciate a check whether the tags here make sense.

@tbkka
Copy link
Contributor Author

tbkka commented Mar 14, 2018

@swift-ci Please smoke benchmark

Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some small fixes

for i in 0..<count {
let raw = UInt32(i) * step
let f = Float(bitPattern: raw)
s = f.description
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can write this as: blackHole(f.description)

Blackhole is from TestUtils.swift, which has a few no-op functions that the optimizer cannot see into (separate module). This way you can avoid trying to trick the optimizer and have trivial uses of values.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out. That's much cleaner.

for i in 0..<count {
let raw = UInt32(i) * step
let f = Float(bitPattern: raw)
s = "result was \(f)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is your intention to avoid having the final string be small? If so, blackHole("and the actual result was \(f)") is more future proof, as not even a 5-bit encoding can store this.

for _ in 0..<N {
for i in 0..<count {
let fraction = UInt64(i) * step
let exponent = UInt(i) % 32768
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @stephentyrone as I don't know how to benchmark floats (or the magic numbers).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine.

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (15)
TEST OLD NEW DELTA SPEEDUP
WordSplitASCII 8060 10483 +30.1% 0.77x (?)
ObjectiveCBridgeStubFromNSStringRef 156 187 +19.9% 0.83x
WordCountUniqueUTF16 19465 22079 +13.4% 0.88x (?)
MapReduceAnyCollection 405 458 +13.1% 0.88x
ObjectiveCBridgeFromNSSetAnyObjectForced 4320 4866 +12.6% 0.89x (?)
StaticArray 10 11 +10.0% 0.91x
ObjectiveCBridgeFromNSString 1433 1571 +9.6% 0.91x (?)
DropLastCountableRangeLazy 11 12 +9.1% 0.92x
MapReduceLazyCollectionShort 34 37 +8.8% 0.92x
DropLastSequence 630 675 +7.1% 0.93x
RemoveWhereMoveInts 14 15 +7.1% 0.93x
CStringLongAscii 4664 4991 +7.0% 0.93x
DropLastSequenceLazy 630 674 +7.0% 0.93x
StringWordBuilderReservingCapacity 2056 2175 +5.8% 0.95x
StringBuilderWithLongSubstring 1348 1424 +5.6% 0.95x (?)
Improvement (26)
TEST OLD NEW DELTA SPEEDUP
BinaryFloatingPointPropertiesBinade 31 25 -19.4% 1.24x
PrefixWhileArray 105 88 -16.2% 1.19x
RangeIterationSigned 200 171 -14.5% 1.17x
LazilyFilteredRange 3908 3342 -14.5% 1.17x
ObjectiveCBridgeFromNSArrayAnyObjectToString 47295 41642 -12.0% 1.14x
Sim2DArray 663 599 -9.7% 1.11x
ReversedBidirectional 19273 17617 -8.6% 1.09x
PointerArithmetics 34362 31496 -8.3% 1.09x
BinaryFloatingPointConversionFromBinaryInteger 41 38 -7.3% 1.08x
CharIteration_korean_unicodeScalars 21447 19946 -7.0% 1.08x
CharIteration_ascii_unicodeScalars 22120 20578 -7.0% 1.07x
WordSplitUTF16 11437 10651 -6.9% 1.07x (?)
CharIteration_japanese_unicodeScalars 26470 24668 -6.8% 1.07x
CharIteration_chinese_unicodeScalars 16713 15582 -6.8% 1.07x
CharIteration_russian_unicodeScalars 18385 17143 -6.8% 1.07x
CharIteration_tweet_unicodeScalars 43502 40658 -6.5% 1.07x
StrToInt 2267 2122 -6.4% 1.07x
CharIteration_punctuated_unicodeScalars 4942 4630 -6.3% 1.07x
ObjectiveCBridgeFromNSArrayAnyObjectForced 4525 4240 -6.3% 1.07x (?)
CharIteration_punctuatedJapanese_unicodeScalars 3927 3691 -6.0% 1.06x
ObjectiveCBridgeFromNSDictionaryAnyObject 137609 129387 -6.0% 1.06x
Chars 1025 967 -5.7% 1.06x
ArrayAppendUTF16 38726 36579 -5.5% 1.06x
BinaryFloatingPointPropertiesUlp 37 35 -5.4% 1.06x
ObjectiveCBridgeFromNSStringForced 2598 2469 -5.0% 1.05x (?)
SumUsingReduceInto 102 97 -4.9% 1.05x
No Changes (346)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 3599 3670 +2.0% 0.98x
AnyHashableWithAClass 72469 72826 +0.5% 1.00x (?)
Array2D 2553 2550 -0.1% 1.00x (?)
ArrayAppend 1072 1067 -0.5% 1.00x
ArrayAppendArrayOfInt 799 799 +0.0% 1.00x
ArrayAppendAscii 13270 13346 +0.6% 0.99x
ArrayAppendFromGeneric 800 800 +0.0% 1.00x
ArrayAppendGenericStructs 1432 1414 -1.3% 1.01x (?)
ArrayAppendLatin1 37072 38393 +3.6% 0.97x
ArrayAppendLazyMap 1342 1349 +0.5% 0.99x
ArrayAppendOptionals 1425 1432 +0.5% 1.00x (?)
ArrayAppendRepeatCol 1341 1370 +2.2% 0.98x
ArrayAppendReserved 800 798 -0.2% 1.00x (?)
ArrayAppendSequence 1121 1122 +0.1% 1.00x (?)
ArrayAppendStrings 15151 15111 -0.3% 1.00x
ArrayAppendToFromGeneric 798 790 -1.0% 1.01x (?)
ArrayAppendToGeneric 800 799 -0.1% 1.00x (?)
ArrayInClass 85 86 +1.2% 0.99x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 150 151 +0.7% 0.99x (?)
ArrayOfGenericRef 4386 4370 -0.4% 1.00x
ArrayOfPOD 183 183 +0.0% 1.00x
ArrayOfRef 4463 4477 +0.3% 1.00x (?)
ArrayPlusEqualArrayOfInt 793 799 +0.8% 0.99x
ArrayPlusEqualFiveElementCollection 5454 5478 +0.4% 1.00x
ArrayPlusEqualSingleElementCollection 1067 1068 +0.1% 1.00x (?)
ArrayPlusEqualThreeElements 1648 1653 +0.3% 1.00x (?)
ArraySubscript 1547 1532 -1.0% 1.01x
ArrayValueProp 8 8 +0.0% 1.00x
ArrayValueProp2 8 8 +0.0% 1.00x
ArrayValueProp3 8 8 +0.0% 1.00x
ArrayValueProp4 8 8 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 28 28 +0.0% 1.00x
BitCount 211 202 -4.3% 1.04x
ByteSwap 104 101 -2.9% 1.03x
COWTree 5599 5549 -0.9% 1.01x (?)
CSVParsing 759370 760066 +0.1% 1.00x (?)
CSVParsingAlt 729848 731313 +0.2% 1.00x (?)
CSVParsingAltIndices 693520 694965 +0.2% 1.00x
CStringLongNonAscii 2178 2252 +3.4% 0.97x
CStringShortAscii 5590 5701 +2.0% 0.98x
Calculator 638 666 +4.4% 0.96x
CaptureProp 3956 3936 -0.5% 1.01x
CharIndexing_ascii_unicodeScalars 16844 16653 -1.1% 1.01x
CharIndexing_ascii_unicodeScalars_Backwards 15633 15615 -0.1% 1.00x
CharIndexing_chinese_unicodeScalars 12709 12605 -0.8% 1.01x
CharIndexing_chinese_unicodeScalars_Backwards 11833 11821 -0.1% 1.00x (?)
CharIndexing_japanese_unicodeScalars 20092 19933 -0.8% 1.01x (?)
CharIndexing_japanese_unicodeScalars_Backwards 18710 18692 -0.1% 1.00x
CharIndexing_korean_unicodeScalars 16309 16140 -1.0% 1.01x
CharIndexing_korean_unicodeScalars_Backwards 15145 15139 -0.0% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 3034 3017 -0.6% 1.01x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2837 2829 -0.3% 1.00x
CharIndexing_punctuated_unicodeScalars 3795 3778 -0.4% 1.00x
CharIndexing_punctuated_unicodeScalars_Backwards 3551 3538 -0.4% 1.00x
CharIndexing_russian_unicodeScalars 13977 13905 -0.5% 1.01x
CharIndexing_russian_unicodeScalars_Backwards 13017 13005 -0.1% 1.00x
CharIndexing_tweet_unicodeScalars 33918 32482 -4.2% 1.04x
CharIndexing_tweet_unicodeScalars_Backwards 30818 30644 -0.6% 1.01x
CharIndexing_utf16_unicodeScalars 21792 21549 -1.1% 1.01x
CharIndexing_utf16_unicodeScalars_Backwards 21554 21578 +0.1% 1.00x (?)
CharIteration_ascii_unicodeScalars_Backwards 15311 15302 -0.1% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 11602 11586 -0.1% 1.00x (?)
CharIteration_japanese_unicodeScalars_Backwards 18349 18320 -0.2% 1.00x
CharIteration_korean_unicodeScalars_Backwards 14845 14842 -0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2776 2772 -0.1% 1.00x
CharIteration_punctuated_unicodeScalars_Backwards 3470 3467 -0.1% 1.00x (?)
CharIteration_russian_unicodeScalars_Backwards 12790 12741 -0.4% 1.00x
CharIteration_tweet_unicodeScalars_Backwards 30277 30230 -0.2% 1.00x
CharIteration_utf16_unicodeScalars 28207 27690 -1.8% 1.02x
CharIteration_utf16_unicodeScalars_Backwards 18472 18699 +1.2% 0.99x
CharacterLiteralsLarge 5730 5706 -0.4% 1.00x (?)
CharacterLiteralsSmall 412 414 +0.5% 1.00x
CharacterPropertiesFetch 4695 4626 -1.5% 1.01x (?)
CharacterPropertiesPrecomputed 1630 1633 +0.2% 1.00x (?)
CharacterPropertiesStashed 1589 1562 -1.7% 1.02x
CharacterPropertiesStashedMemo 2333 2308 -1.1% 1.01x (?)
ClassArrayGetter 15 15 +0.0% 1.00x
Combos 468 468 +0.0% 1.00x
DictOfArraysToArrayOfDicts 906 884 -2.4% 1.02x (?)
Dictionary 863 851 -1.4% 1.01x (?)
Dictionary2 1979 1977 -0.1% 1.00x (?)
Dictionary2OfObjects 3329 3339 +0.3% 1.00x (?)
Dictionary3 534 533 -0.2% 1.00x (?)
Dictionary3OfObjects 873 875 +0.2% 1.00x (?)
Dictionary4 974 977 +0.3% 1.00x (?)
Dictionary4OfObjects 1188 1176 -1.0% 1.01x
DictionaryBridge 2114 2178 +3.0% 0.97x
DictionaryCopy 443881 438967 -1.1% 1.01x (?)
DictionaryFilter 449834 446335 -0.8% 1.01x
DictionaryGroup 480 484 +0.8% 0.99x (?)
DictionaryGroupOfObjects 2477 2479 +0.1% 1.00x (?)
DictionaryLiteral 2877 2881 +0.1% 1.00x (?)
DictionaryOfObjects 2527 2575 +1.9% 0.98x (?)
DictionaryRemove 9296 9459 +1.8% 0.98x (?)
DictionaryRemoveOfObjects 33266 32590 -2.0% 1.02x (?)
DictionarySubscriptDefaultMutation 650 648 -0.3% 1.00x
DictionarySubscriptDefaultMutationArray 1031 1058 +2.6% 0.97x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 4563 4575 +0.3% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 2086 2096 +0.5% 1.00x (?)
DictionarySwap 2522 2533 +0.4% 1.00x
DictionarySwapOfObjects 11214 11163 -0.5% 1.00x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 84 84 +0.0% 1.00x
DropFirstAnyCollectionLazy 69704 69627 -0.1% 1.00x (?)
DropFirstAnySeqCRangeIter 21460 21471 +0.1% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 21501 21512 +0.1% 1.00x (?)
DropFirstAnySeqCntRange 29 28 -3.4% 1.04x
DropFirstAnySeqCntRangeLazy 28 28 +0.0% 1.00x
DropFirstAnySequence 5036 5027 -0.2% 1.00x (?)
DropFirstAnySequenceLazy 5063 5023 -0.8% 1.01x
DropFirstArray 35 35 +0.0% 1.00x
DropFirstArrayLazy 35 35 +0.0% 1.00x
DropFirstCountableRange 35 35 +0.0% 1.00x
DropFirstCountableRangeLazy 35 35 +0.0% 1.00x
DropFirstSequence 2683 2682 -0.0% 1.00x
DropFirstSequenceLazy 2767 2773 +0.2% 1.00x (?)
DropLastAnyCollection 31 32 +3.2% 0.97x
DropLastAnyCollectionLazy 23868 23120 -3.1% 1.03x (?)
DropLastAnySeqCRangeIter 3943 3960 +0.4% 1.00x (?)
DropLastAnySeqCRangeIterLazy 3866 3857 -0.2% 1.00x
DropLastAnySeqCntRange 14 14 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 13 13 +0.0% 1.00x
DropLastAnySequence 5264 5247 -0.3% 1.00x
DropLastAnySequenceLazy 5365 5321 -0.8% 1.01x (?)
DropLastCountableRange 11 11 +0.0% 1.00x
DropWhileAnyCollection 108 107 -0.9% 1.01x
DropWhileAnyCollectionLazy 125 125 +0.0% 1.00x
DropWhileAnySeqCRangeIter 17486 17547 +0.3% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 90 90 +0.0% 1.00x
DropWhileAnySeqCntRange 36 37 +2.8% 0.97x
DropWhileAnySeqCntRangeLazy 90 90 +0.0% 1.00x
DropWhileAnySequence 5656 5660 +0.1% 1.00x (?)
DropWhileAnySequenceLazy 1858 1855 -0.2% 1.00x (?)
DropWhileArrayLazy 88 88 +0.0% 1.00x
DropWhileCountableRange 35 35 +0.0% 1.00x
DropWhileCountableRangeLazy 105 105 +0.0% 1.00x
DropWhileSequence 1327 1325 -0.2% 1.00x
DropWhileSequenceLazy 88 88 +0.0% 1.00x
EqualStringSubstring 49 49 +0.0% 1.00x
EqualSubstringString 49 49 +0.0% 1.00x
EqualSubstringSubstring 48 48 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 48 48 +0.0% 1.00x
ErrorHandling 2439 2481 +1.7% 0.98x
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1334 1342 +0.6% 0.99x (?)
FilterEvenUsingReduceInto 148 148 +0.0% 1.00x
FrequenciesUsingReduce 6846 6882 +0.5% 0.99x (?)
FrequenciesUsingReduceInto 3498 3423 -2.1% 1.02x (?)
Hanoi 3613 3622 +0.2% 1.00x (?)
HashTest 1777 1797 +1.1% 0.99x (?)
Histogram 1532 1535 +0.2% 1.00x (?)
Integrate 346 335 -3.2% 1.03x
IterateData 1827 1871 +2.4% 0.98x
Join 352 347 -1.4% 1.01x (?)
LazilyFilteredArrayContains 37466 36676 -2.1% 1.02x
LazilyFilteredArrays 66882 65064 -2.7% 1.03x (?)
LessSubstringSubstring 48 48 +0.0% 1.00x
LessSubstringSubstringGenericComparable 49 49 +0.0% 1.00x
LinkedList 7609 7545 -0.8% 1.01x
LuhnAlgoEager 578 575 -0.5% 1.01x (?)
LuhnAlgoLazy 581 573 -1.4% 1.01x
MapReduce 401 400 -0.2% 1.00x (?)
MapReduceAnyCollectionShort 2219 2258 +1.8% 0.98x
MapReduceClass 3022 3009 -0.4% 1.00x (?)
MapReduceClassShort 4563 4553 -0.2% 1.00x (?)
MapReduceLazyCollection 13 13 +0.0% 1.00x
MapReduceLazySequence 86 86 +0.0% 1.00x
MapReduceSequence 450 446 -0.9% 1.01x (?)
MapReduceShort 2029 2014 -0.7% 1.01x (?)
MapReduceShortString 21 21 +0.0% 1.00x
MapReduceString 79 81 +2.5% 0.98x
Memset 219 219 +0.0% 1.00x
MonteCarloE 10203 10490 +2.8% 0.97x
MonteCarloPi 42673 42979 +0.7% 0.99x
NSDictionaryCastToSwift 5545 5601 +1.0% 0.99x (?)
NSError 304 301 -1.0% 1.01x
NSStringConversion 300 301 +0.3% 1.00x (?)
NibbleSort 3671 3696 +0.7% 0.99x
NopDeinit 30197 31622 +4.7% 0.95x
ObjectAllocation 187 187 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 20694 20615 -0.4% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 35852 34644 -3.4% 1.03x (?)
ObjectiveCBridgeFromNSSetAnyObject 52932 55321 +4.5% 0.96x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 83067 84169 +1.3% 0.99x (?)
ObjectiveCBridgeStubDataAppend 10383 10911 +5.1% 0.95x
ObjectiveCBridgeStubDateMutation 515 515 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 26921 25892 -3.8% 1.04x (?)
ObjectiveCBridgeStubFromNSDate 4888 4924 +0.7% 0.99x (?)
ObjectiveCBridgeStubFromNSString 877 869 -0.9% 1.01x
ObjectiveCBridgeStubNSDataAppend 2607 2603 -0.2% 1.00x (?)
ObjectiveCBridgeStubNSDateMutationRef 13190 13290 +0.8% 0.99x (?)
ObjectiveCBridgeStubToArrayOfNSString 28875 29376 +1.7% 0.98x (?)
ObjectiveCBridgeStubToNSDate 15653 15708 +0.4% 1.00x (?)
ObjectiveCBridgeStubToNSDateRef 3417 3411 -0.2% 1.00x (?)
ObjectiveCBridgeStubToNSString 1512 1513 +0.1% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 116 113 -2.6% 1.03x
ObjectiveCBridgeStubURLAppendPath 336939 349769 +3.8% 0.96x
ObjectiveCBridgeStubURLAppendPathRef 331573 336609 +1.5% 0.99x (?)
ObjectiveCBridgeToNSArray 28640 29001 +1.3% 0.99x (?)
ObjectiveCBridgeToNSDictionary 52552 51177 -2.6% 1.03x (?)
ObjectiveCBridgeToNSSet 43104 42088 -2.4% 1.02x (?)
ObjectiveCBridgeToNSString 1287 1285 -0.2% 1.00x (?)
ObserverClosure 2176 2169 -0.3% 1.00x
ObserverForwarderStruct 1003 997 -0.6% 1.01x (?)
ObserverPartiallyAppliedMethod 3780 3747 -0.9% 1.01x
ObserverUnappliedMethod 2387 2386 -0.0% 1.00x (?)
OpenClose 126 128 +1.6% 0.98x
PartialApplyDynamicType 0 0 +0.0% 1.00x
Phonebook 3896 3865 -0.8% 1.01x
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1935 1944 +0.5% 1.00x (?)
PopFrontArrayGeneric 1960 1963 +0.2% 1.00x (?)
PopFrontUnsafePointer 9421 8990 -4.6% 1.05x (?)
PrefixAnyCollection 84 85 +1.2% 0.99x
PrefixAnyCollectionLazy 69289 69350 +0.1% 1.00x (?)
PrefixAnySeqCRangeIter 16569 16568 -0.0% 1.00x (?)
PrefixAnySeqCRangeIterLazy 16596 16567 -0.2% 1.00x
PrefixAnySeqCntRange 29 28 -3.4% 1.04x
PrefixAnySeqCntRangeLazy 29 28 -3.4% 1.04x
PrefixAnySequence 4367 4372 +0.1% 1.00x (?)
PrefixAnySequenceLazy 4366 4363 -0.1% 1.00x (?)
PrefixArray 35 35 +0.0% 1.00x
PrefixArrayLazy 35 35 +0.0% 1.00x
PrefixCountableRange 35 35 +0.0% 1.00x
PrefixCountableRangeLazy 35 35 +0.0% 1.00x
PrefixSequence 1326 1325 -0.1% 1.00x
PrefixSequenceLazy 1413 1415 +0.1% 1.00x (?)
PrefixWhileAnyCollection 154 154 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 90 90 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 9778 9743 -0.4% 1.00x
PrefixWhileAnySeqCRangeIterLazy 24 24 +0.0% 1.00x
PrefixWhileAnySeqCntRange 60 60 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 24 24 +0.0% 1.00x
PrefixWhileAnySequence 11035 11045 +0.1% 1.00x (?)
PrefixWhileAnySequenceLazy 1393 1393 +0.0% 1.00x
PrefixWhileArrayLazy 70 70 +0.0% 1.00x
PrefixWhileCountableRange 35 35 +0.0% 1.00x
PrefixWhileCountableRangeLazy 35 35 +0.0% 1.00x
PrefixWhileSequence 362 380 +5.0% 0.95x
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 1296 1307 +0.8% 0.99x (?)
PrimsSplit 1276 1281 +0.4% 1.00x (?)
QueueConcrete 1297 1299 +0.2% 1.00x (?)
QueueGeneric 1117 1122 +0.4% 1.00x
RC4 164 165 +0.6% 0.99x
RGBHistogram 5276 5236 -0.8% 1.01x (?)
RGBHistogramOfObjects 30473 30203 -0.9% 1.01x (?)
RangeAssignment 352 351 -0.3% 1.00x (?)
RangeIterationSigned64 200 200 +0.0% 1.00x
RangeIterationUnsigned 200 200 +0.0% 1.00x
RangeReplaceableCollectionPlusDefault 991 975 -1.6% 1.02x (?)
RecursiveOwnedParameter 2348 2324 -1.0% 1.01x
RemoveWhereFilterInts 46 46 +0.0% 1.00x
RemoveWhereFilterString 381 380 -0.3% 1.00x (?)
RemoveWhereFilterStrings 430 430 +0.0% 1.00x
RemoveWhereMoveStrings 522 522 +0.0% 1.00x
RemoveWhereQuadraticInts 1290 1291 +0.1% 1.00x
RemoveWhereQuadraticString 487 484 -0.6% 1.01x (?)
RemoveWhereQuadraticStrings 2752 2758 +0.2% 1.00x (?)
RemoveWhereSwapInts 19 19 +0.0% 1.00x
RemoveWhereSwapStrings 848 849 +0.1% 1.00x (?)
ReversedArray 57 57 +0.0% 1.00x
ReversedDictionary 491 489 -0.4% 1.00x (?)
RomanNumbers 136999 137154 +0.1% 1.00x (?)
SequenceAlgosAnySequence 11983 11956 -0.2% 1.00x (?)
SequenceAlgosArray 1579 1579 +0.0% 1.00x
SequenceAlgosContiguousArray 1576 1580 +0.3% 1.00x
SequenceAlgosList 1350 1347 -0.2% 1.00x
SequenceAlgosRange 2576 2577 +0.0% 1.00x (?)
SequenceAlgosUnfoldSequence 1080 1080 +0.0% 1.00x
SetExclusiveOr 9605 9631 +0.3% 1.00x (?)
SetExclusiveOr_OfObjects 18630 18627 -0.0% 1.00x (?)
SetIntersect 1939 1950 +0.6% 0.99x (?)
SetIntersect_OfObjects 4262 4261 -0.0% 1.00x (?)
SetIsSubsetOf 517 512 -1.0% 1.01x
SetIsSubsetOf_OfObjects 686 683 -0.4% 1.00x (?)
SetUnion 7385 7259 -1.7% 1.02x
SetUnion_OfObjects 14552 14556 +0.0% 1.00x (?)
SevenBoom 1528 1525 -0.2% 1.00x (?)
SortLargeExistentials 6820 6843 +0.3% 1.00x (?)
SortLettersInPlace 1124 1121 -0.3% 1.00x (?)
SortSortedStrings 1035 1041 +0.6% 0.99x
SortStrings 1869 1899 +1.6% 0.98x
SortStringsUnicode 2672 2697 +0.9% 0.99x
StackPromo 22206 22184 -0.1% 1.00x (?)
StrComplexWalk 1562 1560 -0.1% 1.00x
StringAdder 4205 4186 -0.5% 1.00x (?)
StringBuilder 1592 1610 +1.1% 0.99x
StringBuilderLong 1605 1616 +0.7% 0.99x
StringComparison_abnormal 970 977 +0.7% 0.99x (?)
StringComparison_ascii 991 992 +0.1% 1.00x
StringComparison_emoji 780 777 -0.4% 1.00x (?)
StringComparison_fastPrenormal 776 767 -1.2% 1.01x
StringComparison_latin1 597 592 -0.8% 1.01x
StringComparison_longSharedPrefix 916 914 -0.2% 1.00x
StringComparison_nonBMPSlowestPrenormal 1522 1527 +0.3% 1.00x (?)
StringComparison_slowerPrenormal 1646 1670 +1.5% 0.99x
StringComparison_zalgo 115373 115472 +0.1% 1.00x (?)
StringEdits 127979 132122 +3.2% 0.97x (?)
StringEnumRawValueInitialization 902 902 +0.0% 1.00x
StringEqualPointerComparison 286 286 +0.0% 1.00x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 100 99 -1.0% 1.01x (?)
StringHasPrefixAscii 1345 1346 +0.1% 1.00x (?)
StringHasPrefixUnicode 110358 109838 -0.5% 1.00x (?)
StringHasSuffixAscii 1519 1518 -0.1% 1.00x (?)
StringHasSuffixUnicode 114236 114293 +0.0% 1.00x (?)
StringInterpolation 10101 10309 +2.1% 0.98x (?)
StringInterpolationManySmallSegments 20372 21040 +3.3% 0.97x
StringInterpolationSmall 8310 8442 +1.6% 0.98x (?)
StringMatch 9626 9849 +2.3% 0.98x
StringRemoveDupes 1318 1325 +0.5% 0.99x (?)
StringUTF16Builder 2471 2506 +1.4% 0.99x (?)
StringUTF16SubstringBuilder 5293 5462 +3.2% 0.97x (?)
StringWalk 1416 1419 +0.2% 1.00x
StringWithCString 43211 43180 -0.1% 1.00x (?)
StringWordBuilder 2381 2503 +5.1% 0.95x
SubstringComparable 46 46 +0.0% 1.00x
SubstringEqualString 524 528 +0.8% 0.99x (?)
SubstringEquatable 1334 1340 +0.4% 1.00x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 70 70 +0.0% 1.00x
SuffixAnyCollection 31 31 +0.0% 1.00x
SuffixAnyCollectionLazy 23451 23213 -1.0% 1.01x (?)
SuffixAnySeqCRangeIter 4150 4161 +0.3% 1.00x (?)
SuffixAnySeqCRangeIterLazy 4146 4167 +0.5% 0.99x (?)
SuffixAnySeqCntRange 21 21 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 21 21 +0.0% 1.00x
SuffixAnySequence 5229 5232 +0.1% 1.00x (?)
SuffixAnySequenceLazy 5319 5332 +0.2% 1.00x (?)
SuffixCountableRange 11 11 +0.0% 1.00x
SuffixCountableRangeLazy 12 12 +0.0% 1.00x
SuffixSequence 3771 3773 +0.1% 1.00x (?)
SuffixSequenceLazy 3768 3779 +0.3% 1.00x
SumUsingReduce 97 102 +5.2% 0.95x
SuperChars 40216 41327 +2.8% 0.97x
TwoSum 2274 2308 +1.5% 0.99x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 272 270 -0.7% 1.01x
Walsh 400 395 -1.2% 1.01x
WordCountHistogramASCII 8373 8350 -0.3% 1.00x (?)
WordCountHistogramUTF16 29063 30565 +5.2% 0.95x (?)
WordCountUniqueASCII 3080 3071 -0.3% 1.00x (?)
XorLoop 395 400 +1.3% 0.99x
Added (6)
TEST MIN MAX MEAN MAX_RSS
FloatingPointPrinting_Double_description 133981 134167 134101 7675904
FloatingPointPrinting_Double_interpolated 183676 186306 185397 7686827
FloatingPointPrinting_Float80_description 1711259 1715348 1713926 7686827
FloatingPointPrinting_Float80_interpolated 1758494 1766203 1762367 7684096
FloatingPointPrinting_Float_description 44853 46521 45432 7671808
FloatingPointPrinting_Float_interpolated 85360 91350 89061 7680000

Unoptimized (Onone)

Regression (9)
TEST OLD NEW DELTA SPEEDUP
WordSplitUTF16 15626 27925 +78.7% 0.56x (?)
WordSplitASCII 12051 15938 +32.3% 0.76x (?)
ObjectiveCBridgeFromNSStringForced 2934 3293 +12.2% 0.89x (?)
CharIndexing_tweet_unicodeScalars_Backwards 816187 893399 +9.5% 0.91x (?)
CharIteration_russian_unicodeScalars 146977 159247 +8.3% 0.92x (?)
CharIndexing_japanese_unicodeScalars 444652 481622 +8.3% 0.92x (?)
CharIndexing_punctuated_unicodeScalars 83487 89268 +6.9% 0.94x (?)
NSDictionaryCastToSwift 6327 6698 +5.9% 0.94x (?)
WordCountHistogramASCII 48429 51117 +5.6% 0.95x (?)
Improvement (14)
TEST OLD NEW DELTA SPEEDUP
CharIteration_utf16_unicodeScalars 154895 132569 -14.4% 1.17x
RangeIterationSigned64 45530 39856 -12.5% 1.14x
ObjectiveCBridgeFromNSSetAnyObjectForced 7616 6668 -12.4% 1.14x
CharIndexing_chinese_unicodeScalars 312987 276142 -11.8% 1.13x (?)
ArrayPlusEqualSingleElementCollection 259702 234477 -9.7% 1.11x
CharIndexing_ascii_unicodeScalars_Backwards 458162 415149 -9.4% 1.10x (?)
CharIndexing_korean_unicodeScalars 387947 354514 -8.6% 1.09x
CharIndexing_tweet_unicodeScalars 789102 723000 -8.4% 1.09x (?)
CharIndexing_ascii_unicodeScalars 397168 367374 -7.5% 1.08x (?)
PointerArithmetics 123245 114657 -7.0% 1.07x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 64846 60366 -6.9% 1.07x
StringBuilderWithLongSubstring 4810 4488 -6.7% 1.07x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 98744 92476 -6.3% 1.07x (?)
CharIndexing_russian_unicodeScalars_Backwards 373762 355217 -5.0% 1.05x (?)
No Changes (364)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 5095 5060 -0.7% 1.01x (?)
AnyHashableWithAClass 89776 89843 +0.1% 1.00x (?)
Array2D 636713 639555 +0.4% 1.00x
ArrayAppend 4669 4673 +0.1% 1.00x (?)
ArrayAppendArrayOfInt 850 870 +2.4% 0.98x (?)
ArrayAppendAscii 39398 39066 -0.8% 1.01x (?)
ArrayAppendFromGeneric 872 873 +0.1% 1.00x
ArrayAppendGenericStructs 1505 1509 +0.3% 1.00x (?)
ArrayAppendLatin1 63419 63414 -0.0% 1.00x (?)
ArrayAppendLazyMap 174431 173332 -0.6% 1.01x
ArrayAppendOptionals 1505 1516 +0.7% 0.99x (?)
ArrayAppendRepeatCol 196654 195624 -0.5% 1.01x
ArrayAppendReserved 4396 4393 -0.1% 1.00x (?)
ArrayAppendSequence 150260 150252 -0.0% 1.00x (?)
ArrayAppendStrings 15444 15371 -0.5% 1.00x
ArrayAppendToFromGeneric 867 870 +0.3% 1.00x (?)
ArrayAppendToGeneric 874 876 +0.2% 1.00x (?)
ArrayAppendUTF16 61075 61001 -0.1% 1.00x (?)
ArrayInClass 6238 6142 -1.5% 1.02x
ArrayLiteral 1797 1795 -0.1% 1.00x (?)
ArrayOfGenericPOD2 1128 1129 +0.1% 1.00x (?)
ArrayOfGenericRef 10206 10166 -0.4% 1.00x (?)
ArrayOfPOD 849 849 +0.0% 1.00x
ArrayOfRef 9519 9426 -1.0% 1.01x (?)
ArrayPlusEqualArrayOfInt 861 866 +0.6% 0.99x (?)
ArrayPlusEqualFiveElementCollection 258788 260876 +0.8% 0.99x (?)
ArrayPlusEqualThreeElements 9266 9310 +0.5% 1.00x (?)
ArraySubscript 109983 109948 -0.0% 1.00x (?)
ArrayValueProp 3686 3645 -1.1% 1.01x (?)
ArrayValueProp2 17612 17614 +0.0% 1.00x (?)
ArrayValueProp3 4130 4143 +0.3% 1.00x (?)
ArrayValueProp4 4087 4104 +0.4% 1.00x (?)
BinaryFloatingPointConversionFromBinaryInteger 6224 6260 +0.6% 0.99x (?)
BinaryFloatingPointPropertiesBinade 91 88 -3.3% 1.03x
BinaryFloatingPointPropertiesNextUp 126 125 -0.8% 1.01x
BinaryFloatingPointPropertiesUlp 128 129 +0.8% 0.99x
BitCount 8893 8666 -2.6% 1.03x
ByteSwap 10020 9850 -1.7% 1.02x
COWTree 12031 12275 +2.0% 0.98x (?)
CSVParsing 2515171 2525991 +0.4% 1.00x (?)
CSVParsingAlt 1388916 1406364 +1.3% 0.99x (?)
CSVParsingAltIndices 2269860 2278744 +0.4% 1.00x (?)
CStringLongAscii 4623 4619 -0.1% 1.00x (?)
CStringLongNonAscii 2090 2087 -0.1% 1.00x (?)
CStringShortAscii 8577 8218 -4.2% 1.04x (?)
Calculator 1528 1571 +2.8% 0.97x
CaptureProp 247697 248723 +0.4% 1.00x
CharIndexing_chinese_unicodeScalars_Backwards 307691 304049 -1.2% 1.01x (?)
CharIndexing_japanese_unicodeScalars_Backwards 547888 553795 +1.1% 0.99x (?)
CharIndexing_korean_unicodeScalars_Backwards 403907 408481 +1.1% 0.99x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 66784 64639 -3.2% 1.03x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 71517 71406 -0.2% 1.00x (?)
CharIndexing_russian_unicodeScalars 310089 313535 +1.1% 0.99x (?)
CharIndexing_utf16_unicodeScalars 331162 328867 -0.7% 1.01x (?)
CharIndexing_utf16_unicodeScalars_Backwards 361670 362907 +0.3% 1.00x (?)
CharIteration_ascii_unicodeScalars 159297 155631 -2.3% 1.02x
CharIteration_ascii_unicodeScalars_Backwards 354475 346706 -2.2% 1.02x
CharIteration_chinese_unicodeScalars 119703 117781 -1.6% 1.02x
CharIteration_chinese_unicodeScalars_Backwards 268888 261059 -2.9% 1.03x (?)
CharIteration_japanese_unicodeScalars 189708 187876 -1.0% 1.01x (?)
CharIteration_japanese_unicodeScalars_Backwards 422746 419288 -0.8% 1.01x (?)
CharIteration_korean_unicodeScalars 153109 150673 -1.6% 1.02x (?)
CharIteration_korean_unicodeScalars_Backwards 338797 340586 +0.5% 0.99x (?)
CharIteration_punctuatedJapanese_unicodeScalars 28471 28012 -1.6% 1.02x (?)
CharIteration_punctuated_unicodeScalars 35593 35116 -1.3% 1.01x (?)
CharIteration_punctuated_unicodeScalars_Backwards 77136 76284 -1.1% 1.01x (?)
CharIteration_russian_unicodeScalars_Backwards 296360 287875 -2.9% 1.03x (?)
CharIteration_tweet_unicodeScalars 311340 307883 -1.1% 1.01x (?)
CharIteration_tweet_unicodeScalars_Backwards 704221 687300 -2.4% 1.02x (?)
CharIteration_utf16_unicodeScalars_Backwards 291388 287043 -1.5% 1.02x
CharacterLiteralsLarge 5719 5730 +0.2% 1.00x (?)
CharacterLiteralsSmall 691 666 -3.6% 1.04x
CharacterPropertiesFetch 5698 5511 -3.3% 1.03x (?)
CharacterPropertiesPrecomputed 4618 4810 +4.2% 0.96x
CharacterPropertiesStashed 2432 2398 -1.4% 1.01x (?)
CharacterPropertiesStashedMemo 5464 5475 +0.2% 1.00x (?)
Chars 40078 40041 -0.1% 1.00x (?)
ClassArrayGetter 986 982 -0.4% 1.00x
Combos 2259 2314 +2.4% 0.98x (?)
DictOfArraysToArrayOfDicts 3661 3561 -2.7% 1.03x (?)
Dictionary 2853 2759 -3.3% 1.03x (?)
Dictionary2 3104 3161 +1.8% 0.98x (?)
Dictionary2OfObjects 5966 5993 +0.5% 1.00x (?)
Dictionary3 1449 1413 -2.5% 1.03x
Dictionary3OfObjects 2575 2570 -0.2% 1.00x (?)
Dictionary4 1819 1803 -0.9% 1.01x (?)
Dictionary4OfObjects 2430 2442 +0.5% 1.00x (?)
DictionaryBridge 2216 2244 +1.3% 0.99x (?)
DictionaryCopy 2657484 2643309 -0.5% 1.01x (?)
DictionaryFilter 2694564 2676520 -0.7% 1.01x (?)
DictionaryGroup 4682 4632 -1.1% 1.01x (?)
DictionaryGroupOfObjects 7837 7854 +0.2% 1.00x (?)
DictionaryLiteral 8846 9213 +4.1% 0.96x
DictionaryOfObjects 6497 6788 +4.5% 0.96x (?)
DictionaryRemove 22420 22433 +0.1% 1.00x (?)
DictionaryRemoveOfObjects 58344 60611 +3.9% 0.96x (?)
DictionarySubscriptDefaultMutation 2265 2266 +0.0% 1.00x (?)
DictionarySubscriptDefaultMutationArray 2563 2545 -0.7% 1.01x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 9800 9644 -1.6% 1.02x (?)
DictionarySubscriptDefaultMutationOfObjects 6242 6210 -0.5% 1.01x (?)
DictionarySwap 6330 6376 +0.7% 0.99x (?)
DictionarySwapOfObjects 22025 21996 -0.1% 1.00x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 15541 15475 -0.4% 1.00x (?)
DropFirstAnyCollectionLazy 103396 105575 +2.1% 0.98x (?)
DropFirstAnySeqCRangeIter 23907 23944 +0.2% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 23980 23887 -0.4% 1.00x (?)
DropFirstAnySeqCntRange 15677 15913 +1.5% 0.99x (?)
DropFirstAnySeqCntRangeLazy 15480 15474 -0.0% 1.00x (?)
DropFirstAnySequence 11168 11119 -0.4% 1.00x
DropFirstAnySequenceLazy 11211 11135 -0.7% 1.01x
DropFirstArray 4065 4026 -1.0% 1.01x (?)
DropFirstArrayLazy 28398 28974 +2.0% 0.98x (?)
DropFirstCountableRange 324 324 +0.0% 1.00x
DropFirstCountableRangeLazy 30437 30431 -0.0% 1.00x (?)
DropFirstSequence 10556 10532 -0.2% 1.00x (?)
DropFirstSequenceLazy 10625 10596 -0.3% 1.00x (?)
DropLastAnyCollection 5277 5186 -1.7% 1.02x (?)
DropLastAnyCollectionLazy 33675 33379 -0.9% 1.01x (?)
DropLastAnySeqCRangeIter 40900 40855 -0.1% 1.00x (?)
DropLastAnySeqCRangeIterLazy 40692 40882 +0.5% 1.00x (?)
DropLastAnySeqCntRange 5216 5242 +0.5% 1.00x (?)
DropLastAnySeqCntRangeLazy 5164 5167 +0.1% 1.00x (?)
DropLastAnySequence 29473 29416 -0.2% 1.00x (?)
DropLastAnySequenceLazy 29144 29271 +0.4% 1.00x (?)
DropLastCountableRange 112 112 +0.0% 1.00x
DropLastCountableRangeLazy 10058 10120 +0.6% 0.99x
DropLastSequence 29055 29056 +0.0% 1.00x (?)
DropLastSequenceLazy 29003 28912 -0.3% 1.00x (?)
DropWhileAnyCollection 19663 19677 +0.1% 1.00x (?)
DropWhileAnyCollectionLazy 22848 22735 -0.5% 1.00x (?)
DropWhileAnySeqCRangeIter 25079 25058 -0.1% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 22264 22352 +0.4% 1.00x (?)
DropWhileAnySeqCntRange 19797 19687 -0.6% 1.01x (?)
DropWhileAnySeqCntRangeLazy 22312 22261 -0.2% 1.00x (?)
DropWhileAnySequence 12677 12620 -0.4% 1.00x
DropWhileAnySequenceLazy 10935 10924 -0.1% 1.00x (?)
DropWhileArrayLazy 15277 14613 -4.3% 1.05x
DropWhileCountableRange 4674 4697 +0.5% 1.00x (?)
DropWhileCountableRangeLazy 22384 22260 -0.6% 1.01x (?)
DropWhileSequence 12052 12063 +0.1% 1.00x (?)
DropWhileSequenceLazy 10589 10617 +0.3% 1.00x
EqualStringSubstring 93 93 +0.0% 1.00x
EqualSubstringString 94 94 +0.0% 1.00x
EqualSubstringSubstring 93 93 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 99 102 +3.0% 0.97x
ErrorHandling 7301 7473 +2.4% 0.98x (?)
ExclusivityGlobal 189 186 -1.6% 1.02x
ExclusivityIndependent 72 71 -1.4% 1.01x (?)
FilterEvenUsingReduce 3779 3749 -0.8% 1.01x (?)
FilterEvenUsingReduceInto 1953 1953 +0.0% 1.00x
FrequenciesUsingReduce 11322 11004 -2.8% 1.03x (?)
FrequenciesUsingReduceInto 5702 5748 +0.8% 0.99x (?)
Hanoi 20130 20154 +0.1% 1.00x (?)
HashTest 22235 22943 +3.2% 0.97x
Histogram 7413 7342 -1.0% 1.01x (?)
Integrate 809 816 +0.9% 0.99x
IterateData 5870 5986 +2.0% 0.98x (?)
Join 1136 1133 -0.3% 1.00x (?)
LazilyFilteredArrayContains 802219 799652 -0.3% 1.00x
LazilyFilteredArrays 1527142 1500104 -1.8% 1.02x (?)
LazilyFilteredRange 549708 547383 -0.4% 1.00x
LessSubstringSubstring 94 93 -1.1% 1.01x
LessSubstringSubstringGenericComparable 98 99 +1.0% 0.99x
LinkedList 32183 32080 -0.3% 1.00x (?)
LuhnAlgoEager 5899 5719 -3.1% 1.03x (?)
LuhnAlgoLazy 5920 5878 -0.7% 1.01x (?)
MapReduce 26454 26558 +0.4% 1.00x
MapReduceAnyCollection 26580 26527 -0.2% 1.00x
MapReduceAnyCollectionShort 38226 38652 +1.1% 0.99x (?)
MapReduceClass 30964 30870 -0.3% 1.00x (?)
MapReduceClassShort 42117 42113 -0.0% 1.00x (?)
MapReduceLazyCollection 23224 23254 +0.1% 1.00x (?)
MapReduceLazyCollectionShort 34097 34366 +0.8% 0.99x (?)
MapReduceLazySequence 18658 18711 +0.3% 1.00x (?)
MapReduceSequence 30752 30669 -0.3% 1.00x
MapReduceShort 38267 39643 +3.6% 0.97x (?)
MapReduceShortString 251 245 -2.4% 1.02x (?)
MapReduceString 1857 1872 +0.8% 0.99x (?)
Memset 44155 44098 -0.1% 1.00x (?)
MonteCarloE 1184149 1197836 +1.2% 0.99x
MonteCarloPi 5283840 5289083 +0.1% 1.00x (?)
NSError 718 721 +0.4% 1.00x (?)
NSStringConversion 343 343 +0.0% 1.00x
NibbleSort 494093 492702 -0.3% 1.00x
NopDeinit 179649 177822 -1.0% 1.01x
ObjectAllocation 1426 1426 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 25408 25572 +0.6% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 8569 8865 +3.5% 0.97x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 40190 40690 +1.2% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 37185 38534 +3.6% 0.96x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 128985 124239 -3.7% 1.04x (?)
ObjectiveCBridgeFromNSSetAnyObject 57660 58076 +0.7% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 91166 93409 +2.5% 0.98x (?)
ObjectiveCBridgeFromNSString 3256 3170 -2.6% 1.03x (?)
ObjectiveCBridgeStubDataAppend 5614 5533 -1.4% 1.01x (?)
ObjectiveCBridgeStubDateMutation 916 919 +0.3% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 29235 28368 -3.0% 1.03x (?)
ObjectiveCBridgeStubFromNSDate 6432 6303 -2.0% 1.02x
ObjectiveCBridgeStubFromNSString 941 948 +0.7% 0.99x
ObjectiveCBridgeStubFromNSStringRef 196 199 +1.5% 0.98x (?)
ObjectiveCBridgeStubNSDataAppend 3063 2950 -3.7% 1.04x
ObjectiveCBridgeStubNSDateMutationRef 15447 16170 +4.7% 0.96x (?)
ObjectiveCBridgeStubToArrayOfNSString 28845 29298 +1.6% 0.98x (?)
ObjectiveCBridgeStubToNSDate 16379 16448 +0.4% 1.00x (?)
ObjectiveCBridgeStubToNSDateRef 3483 3522 +1.1% 0.99x
ObjectiveCBridgeStubToNSString 1556 1576 +1.3% 0.99x
ObjectiveCBridgeStubToNSStringRef 156 153 -1.9% 1.02x
ObjectiveCBridgeStubURLAppendPath 339646 350726 +3.3% 0.97x (?)
ObjectiveCBridgeStubURLAppendPathRef 362464 353461 -2.5% 1.03x (?)
ObjectiveCBridgeToNSArray 28892 29704 +2.8% 0.97x (?)
ObjectiveCBridgeToNSDictionary 53809 53429 -0.7% 1.01x (?)
ObjectiveCBridgeToNSSet 43123 43311 +0.4% 1.00x (?)
ObjectiveCBridgeToNSString 1351 1345 -0.4% 1.00x (?)
ObserverClosure 6323 6420 +1.5% 0.98x (?)
ObserverForwarderStruct 4359 4340 -0.4% 1.00x (?)
ObserverPartiallyAppliedMethod 7930 7886 -0.6% 1.01x (?)
ObserverUnappliedMethod 7948 7935 -0.2% 1.00x
OpenClose 560 577 +3.0% 0.97x
PartialApplyDynamicType 40792 40796 +0.0% 1.00x (?)
Phonebook 20756 20653 -0.5% 1.00x (?)
PolymorphicCalls 6247 6309 +1.0% 0.99x (?)
PopFrontArray 4714 4697 -0.4% 1.00x (?)
PopFrontArrayGeneric 5718 5794 +1.3% 0.99x
PopFrontUnsafePointer 11033 10969 -0.6% 1.01x (?)
PrefixAnyCollection 15460 15865 +2.6% 0.97x (?)
PrefixAnyCollectionLazy 99833 100834 +1.0% 0.99x (?)
PrefixAnySeqCRangeIter 19196 19332 +0.7% 0.99x (?)
PrefixAnySeqCRangeIterLazy 19561 19314 -1.3% 1.01x
PrefixAnySeqCntRange 15646 15615 -0.2% 1.00x (?)
PrefixAnySeqCntRangeLazy 15491 15532 +0.3% 1.00x (?)
PrefixAnySequence 9404 9428 +0.3% 1.00x (?)
PrefixAnySequenceLazy 9432 9292 -1.5% 1.02x
PrefixArray 4042 4024 -0.4% 1.00x
PrefixArrayLazy 28884 28536 -1.2% 1.01x (?)
PrefixCountableRange 324 323 -0.3% 1.00x
PrefixCountableRangeLazy 30502 30435 -0.2% 1.00x (?)
PrefixSequence 8906 8770 -1.5% 1.02x
PrefixSequenceLazy 8908 8863 -0.5% 1.01x (?)
PrefixWhileAnyCollection 28024 28052 +0.1% 1.00x (?)
PrefixWhileAnyCollectionLazy 18488 18392 -0.5% 1.01x (?)
PrefixWhileAnySeqCRangeIter 34887 35001 +0.3% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 18208 18317 +0.6% 0.99x
PrefixWhileAnySeqCntRange 28128 28180 +0.2% 1.00x (?)
PrefixWhileAnySeqCntRangeLazy 18498 18516 +0.1% 1.00x (?)
PrefixWhileAnySequence 26582 26584 +0.0% 1.00x (?)
PrefixWhileAnySequenceLazy 9901 10006 +1.1% 0.99x
PrefixWhileArray 10902 11042 +1.3% 0.99x
PrefixWhileArrayLazy 12958 12977 +0.1% 1.00x (?)
PrefixWhileCountableRange 13155 13039 -0.9% 1.01x (?)
PrefixWhileCountableRangeLazy 18378 18370 -0.0% 1.00x (?)
PrefixWhileSequence 26097 27439 +5.1% 0.95x (?)
PrefixWhileSequenceLazy 9852 9822 -0.3% 1.00x (?)
Prims 10171 10112 -0.6% 1.01x (?)
PrimsSplit 10257 10366 +1.1% 0.99x (?)
QueueConcrete 14973 14985 +0.1% 1.00x (?)
QueueGeneric 20399 20401 +0.0% 1.00x (?)
RC4 17057 17608 +3.2% 0.97x
RGBHistogram 29968 29169 -2.7% 1.03x
RGBHistogramOfObjects 103690 100784 -2.8% 1.03x
RangeAssignment 2384 2361 -1.0% 1.01x (?)
RangeIterationSigned 15229 15171 -0.4% 1.00x
RangeIterationUnsigned 36407 36442 +0.1% 1.00x (?)
RangeReplaceableCollectionPlusDefault 11282 11548 +2.4% 0.98x (?)
RecursiveOwnedParameter 8019 7846 -2.2% 1.02x
RemoveWhereFilterInts 2170 2157 -0.6% 1.01x (?)
RemoveWhereFilterString 1521 1522 +0.1% 1.00x (?)
RemoveWhereFilterStrings 2985 2979 -0.2% 1.00x (?)
RemoveWhereMoveInts 3416 3439 +0.7% 0.99x
RemoveWhereMoveStrings 4074 4076 +0.0% 1.00x (?)
RemoveWhereQuadraticInts 8111 8042 -0.9% 1.01x
RemoveWhereQuadraticString 2309 2294 -0.6% 1.01x (?)
RemoveWhereQuadraticStrings 9702 9695 -0.1% 1.00x (?)
RemoveWhereSwapInts 6044 6059 +0.2% 1.00x
RemoveWhereSwapStrings 6725 6726 +0.0% 1.00x (?)
ReversedArray 13760 13802 +0.3% 1.00x
ReversedBidirectional 44589 44564 -0.1% 1.00x (?)
ReversedDictionary 24761 24682 -0.3% 1.00x
RomanNumbers 1327118 1316834 -0.8% 1.01x
SequenceAlgosAnySequence 12949 12902 -0.4% 1.00x (?)
SequenceAlgosArray 816386 813381 -0.4% 1.00x (?)
SequenceAlgosContiguousArray 351948 349465 -0.7% 1.01x
SequenceAlgosList 8207 8219 +0.1% 1.00x
SequenceAlgosRange 1259606 1263418 +0.3% 1.00x (?)
SequenceAlgosUnfoldSequence 5857 5965 +1.8% 0.98x
SetExclusiveOr 21249 21238 -0.1% 1.00x (?)
SetExclusiveOr_OfObjects 50785 51100 +0.6% 0.99x (?)
SetIntersect 9438 9442 +0.0% 1.00x (?)
SetIntersect_OfObjects 14174 14708 +3.8% 0.96x (?)
SetIsSubsetOf 1488 1472 -1.1% 1.01x (?)
SetIsSubsetOf_OfObjects 1819 1804 -0.8% 1.01x (?)
SetUnion 14836 14444 -2.6% 1.03x (?)
SetUnion_OfObjects 35501 34933 -1.6% 1.02x (?)
SevenBoom 1642 1651 +0.5% 0.99x (?)
Sim2DArray 43492 43516 +0.1% 1.00x (?)
SortLargeExistentials 15943 15682 -1.6% 1.02x
SortLettersInPlace 2704 2694 -0.4% 1.00x (?)
SortSortedStrings 1085 1076 -0.8% 1.01x
SortStrings 2069 2073 +0.2% 1.00x
SortStringsUnicode 2851 2793 -2.0% 1.02x
StackPromo 98425 97988 -0.4% 1.00x (?)
StaticArray 2668 2646 -0.8% 1.01x (?)
StrComplexWalk 6211 6204 -0.1% 1.00x
StrToInt 80402 79355 -1.3% 1.01x (?)
StringAdder 4665 4667 +0.0% 1.00x (?)
StringBuilder 7052 6979 -1.0% 1.01x (?)
StringBuilderLong 2762 2778 +0.6% 0.99x (?)
StringComparison_abnormal 1582 1573 -0.6% 1.01x (?)
StringComparison_ascii 9885 9848 -0.4% 1.00x
StringComparison_emoji 2097 2126 +1.4% 0.99x
StringComparison_fastPrenormal 5341 5380 +0.7% 0.99x
StringComparison_latin1 4159 4163 +0.1% 1.00x (?)
StringComparison_longSharedPrefix 2515 2518 +0.1% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 3853 3851 -0.1% 1.00x (?)
StringComparison_slowerPrenormal 4342 4356 +0.3% 1.00x (?)
StringComparison_zalgo 117879 117229 -0.6% 1.01x (?)
StringEdits 347992 344865 -0.9% 1.01x (?)
StringEnumRawValueInitialization 17243 17262 +0.1% 1.00x (?)
StringEqualPointerComparison 3622 3683 +1.7% 0.98x
StringFromLongWholeSubstring 22 22 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 318 320 +0.6% 0.99x (?)
StringHasPrefixAscii 3112 3078 -1.1% 1.01x
StringHasPrefixUnicode 106729 107356 +0.6% 0.99x (?)
StringHasSuffixAscii 3373 3359 -0.4% 1.00x
StringHasSuffixUnicode 107689 107314 -0.3% 1.00x (?)
StringInterpolation 15672 15086 -3.7% 1.04x (?)
StringInterpolationManySmallSegments 21676 21731 +0.3% 1.00x (?)
StringInterpolationSmall 12817 12695 -1.0% 1.01x (?)
StringMatch 33552 32584 -2.9% 1.03x (?)
StringRemoveDupes 1490 1485 -0.3% 1.00x (?)
StringUTF16Builder 7846 7785 -0.8% 1.01x (?)
StringUTF16SubstringBuilder 20006 20342 +1.7% 0.98x (?)
StringWalk 13021 13026 +0.0% 1.00x (?)
StringWithCString 37695 37697 +0.0% 1.00x (?)
StringWordBuilder 2471 2489 +0.7% 0.99x
StringWordBuilderReservingCapacity 2144 2154 +0.5% 1.00x
SubstringComparable 2187 2136 -2.3% 1.02x (?)
SubstringEqualString 1919 1938 +1.0% 0.99x (?)
SubstringEquatable 6586 6324 -4.0% 1.04x (?)
SubstringFromLongString 24 24 +0.0% 1.00x
SubstringFromLongStringGeneric 101 101 +0.0% 1.00x
SuffixAnyCollection 5185 5198 +0.3% 1.00x (?)
SuffixAnyCollectionLazy 34933 33719 -3.5% 1.04x
SuffixAnySeqCRangeIter 36714 36737 +0.1% 1.00x (?)
SuffixAnySeqCRangeIterLazy 36524 36727 +0.6% 0.99x
SuffixAnySeqCntRange 5149 5293 +2.8% 0.97x (?)
SuffixAnySeqCntRangeLazy 5166 5187 +0.4% 1.00x (?)
SuffixAnySequence 25125 25335 +0.8% 0.99x (?)
SuffixAnySequenceLazy 25389 25120 -1.1% 1.01x
SuffixCountableRange 113 112 -0.9% 1.01x
SuffixCountableRangeLazy 10049 10126 +0.8% 0.99x (?)
SuffixSequence 24904 25011 +0.4% 1.00x
SuffixSequenceLazy 25075 24967 -0.4% 1.00x
SumUsingReduce 173321 176134 +1.6% 0.98x
SumUsingReduceInto 174449 171378 -1.8% 1.02x
SuperChars 131892 131684 -0.2% 1.00x (?)
TwoSum 5146 5017 -2.5% 1.03x (?)
TypeFlood 202 201 -0.5% 1.00x (?)
UTF8Decode 31972 31965 -0.0% 1.00x (?)
Walsh 11968 12035 +0.6% 0.99x (?)
WordCountHistogramUTF16 83259 80396 -3.4% 1.04x (?)
WordCountUniqueASCII 8831 8710 -1.4% 1.01x (?)
WordCountUniqueUTF16 32971 32334 -1.9% 1.02x (?)
XorLoop 23224 23226 +0.0% 1.00x (?)
Added (6)
TEST MIN MAX MEAN MAX_RSS
FloatingPointPrinting_Double_description 156770 162593 160268 8003584
FloatingPointPrinting_Double_interpolated 245139 249395 247972 8044544
FloatingPointPrinting_Float80_description 1748193 1753464 1750015 8017237
FloatingPointPrinting_Float80_interpolated 1842885 1858605 1852906 8052736
FloatingPointPrinting_Float_description 64435 70342 68122 7991296
FloatingPointPrinting_Float_interpolated 151271 168037 158085 8044544
Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

Copy link
Contributor

@stephentyrone stephentyrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a second set that benches only "nicely-scaled" values? Uniform on [0,1000] or similar. We wouldn't want to regress those cases for a modest win on all FloatingPoint values.

@tbkka
Copy link
Contributor Author

tbkka commented Mar 14, 2018

@stephentyrone - Did you want to test values with short text forms or values close to 1? Generally speaking, manually-typed values in code tend to be both. The easiest way to generate such numbers would be something like:

for i in 0..<100000 {
   let f = Float(i) / 100
   ... use f ...
}

@stephentyrone
Copy link
Contributor

Values with modest exponents is what I really have in mind; it's common for input values to have short-forms, but not especially common for results that get printed, so I'm less concerned about that. I'd be OK with even your very simple example for now, as long as we have some coverage for this case.

@tbkka
Copy link
Contributor Author

tbkka commented Mar 15, 2018

@swift-ci Please smoke benchmark

@tbkka
Copy link
Contributor Author

tbkka commented Mar 15, 2018

@stephentyrone - I now have _description_uniform (the previous case) and _description_small for each type. The latter just exercises values from about 1e-2 to about 1e3. I tweaked the earlier proposed logic to give numbers with lots of digits:

for i in 1...100000 {
   let f = Float(i) / 101.0
   ... use f ...
}

@swift-ci
Copy link
Contributor

Build comment file:

Build failed before running benchmark.


Copy link
Contributor

@stephentyrone stephentyrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tbkka !

@stephentyrone
Copy link
Contributor

@swift-ci Please smoke benchmark

@milseman
Copy link
Member

@swift-ci please smoke test

@swift-ci
Copy link
Contributor

Build comment file:

Build failed before running benchmark.


@stephentyrone stephentyrone merged commit 848de7e into swiftlang:master Mar 15, 2018
@tbkka tbkka deleted the tbkka-float-description-benchmark branch March 15, 2018 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants