Possible CVI 2012 64 bit bug.
Qsort returns very slowly in CVI2012 in 64 bit release mode. Not sure if there are memory leaks or if function actually returns the correct answer as I fixed the problem before going back and isolating the issue to the code supplied. The issue seems to be resolved in CVI 2013.
In the example provided, an array is created, seeded, and sorted. Approximate timing results (with a chi by eye averaging) are given below for an array of 1e6 double values.
CVI 2012
32 bit debug 32 bit release 64 bit debug 64 bit release
4.5 seconds 0.32 seconds 4.3 seconds 44.0 seconds
CVI 2013
32 bit debug 32 bit release 64 bit debug 64 bit release
2.8 seconds 0.22 seconds 2.0 seconds 0.18 seconds