As can be seen in the project, this is unfortanutely not any faster than the conventional approach. It's especially apparent on turbowarp: https://turbowarp.org/1017130567 ---------------------------------------------------------------------- This project contains a real time test in an actual 3D environment. I tried to make it as fair as possible by keeping the conditions the same for both algorithms. ---------------------------------------------------------------------- Usually 2 lists are used for sorting in 3D projects. One filled with IDs that refer to a specific 3D object, and another filled with all the distances between the camera and objects. The list filled with distances is sorted and the items in the list with IDs gets swapped along with it. So, I thought this proces could be made more efficient by only using a single list in which both the distance and ID values are stored in a single item. This would effectively cut the amount of swaps that have to be performed in half, and, in theory, would drastically improve the execution time. Unfortunately, it seems unlikely that such a system could be ran faster because the extra code required to make it function properly is simply too slow. I initially tried doing to achieve this with decimals, but that was even slower, so here I just stick the id at the end of the distance value. This was definitely a fun experiment, but I sadly don't think it's possible to beat the superior insertion sort.
Thanks to @TheGreenFlash for the insertion sort code: https://scratch.mit.edu/projects/382939992