mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We overflow checked the mulitplication in "a + sizeof(T) * i". This is not necessary for ContingousArrayBuffer because this overflow check has happened when we compute the size of the array during allocation of a native swift array or a NSArray. benchmark``````````````,``baserun0``,``optrun2``,``delta,``speedup Memset`````````````````,``1184.00```,``487.00```,``698.00``,````````143.9% QuickSort``````````````,``1299.00```,``1458.00``,``178.00``,````````-12.2% SelectionSort``````````,``1027.00```,``814.00```,``213.00``,````````26.2% StdlibSort`````````````,``1718.00```,``1587.00``,``127.00``,````````8.0% Walsh``````````````````,``1160.00```,``1076.00``,``86.00```,````````8.1% XorLoop````````````````,``1248.00```,``884.00```,``369.00``,````````42.0% The regression in quicksort is noise - i looked at the LLVM IR and the only thing different in the graph is that we have removed the mulitplication with overflow check (that is - we should be running faster). Same thing looking at the assembly. XorLoop and Memset speed up because we are now able to vectorize those loops. Swift SVN r21218
16 KiB
16 KiB