Quicksort is a commonly used algorithm for sorting data.

It is typically one of the best algorithms in terms of performance. In the real world, we can face data with a different distribution, so there is a good question: is quicksort executes with the same duration for different data distributions?This article provides the answer to the question based on the PHP and Golang implementation of quicksort.

To do this rese arch I used three kinds of distributions, which, in my opinion, in general, describe the most possible way in which data can be distributed.

Based on the results of running scripts on PHP and Golang, I can say that sorting of normal distribution requires more time than other distributions.The best results in terms of performance usually shows Chi-square distribution.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners