Quickselect algorithm in Swift
There are a lot of loops in here. I would probably turn at least one of them into a recursive function; actually, refactoring high low and pivotIndex into let constants with recursion should be faster due to optimizations. (I'm not that good of an FP programmer to mock something up for you quickly).

Otherwise, one suggestion I'd make (just my preference), you have two major loops smooshed next to each other, perhaps another empty line could help readability:

            // Partition elements such that:
            //   a[i] &lt;  pivotElement    for low &lt;= i &lt; pivotIndex,
            //   a[i] &gt;= pivotElement    for pivotIndex &lt;= i &lt; high.
            var pivotIndex = low

            while a[pivotIndex] &lt; pivotElement {
                pivotIndex += 1
            }

            for i in pivotIndex+1 ..&lt; high {
                if a[i] &lt; pivotElement {
                    swap(&amp;a[pivotIndex], &amp;a[i])
                    pivotIndex += 1
                }
            }


I would definitely try refactoring some of this to FP, then running it through some measureBlock()s in Xcode to see if it's faster.

Hope this helps!