Performance Visualization of qsort() Implementations

57 views
Skip to first unread message

DrQ

unread,
Nov 21, 2016, 5:47:43 PM11/21/16
to Performance Visualization
The C standard library includes a qsort() function for sorting arbitrary buffers given a comparator function. The name comes from its original Unix implemenation, “quicker sort,”  a variation of the well-known quicksort algorithm. The C standard doesn’t specify an algorithm. As such, different C libraries use different algorithms and even when using the same algorithm they make different tradeoffs in the implementation.

The author added a drawing routine to a comparison function to see what the sort function was doing for different C libraries. Every time it’s called for a comparison, it writes out a snapshot of the array as a Netpbm PPM image.

Peter Lauterbach

unread,
Nov 22, 2016, 10:55:04 AM11/22/16
to Performance Visualization


On Monday, November 21, 2016 at 5:47:43 PM UTC-5, DrQ wrote:

The author added a drawing routine to a comparison function to see what the sort function was doing for different C libraries. Every time it’s called for a comparison, it writes out a snapshot of the array as a Netpbm PPM image.


Link to blog:


see also for algorithm visualization"

with code animation and data structures

for comparisons amongst sorting algorithms
Reply all
Reply to author
Forward
0 new messages