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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners