Please note that the opinions below are my own, regardless of any literature that might exist on the topic. They are not supposed to be considered science, regardless of how "science" might be defined.
The short answers:
We have no idea how the human brain actually works - referring here to mathematical computations, comparisons etc.
It is guaranteed that the human brain works radically different from any computer.
Maybe I am not accurate in my "metaphor", but I reached this conclusion: the human brain does many (most?) calculations "visually": you just look and you know the correct answer. A computer would need very complex algorithms, and it might still not be able to solve the problem.
Also, the human brain is able to generate a totally different problem, with the same result / answer like the original, but a lot easier to calculate. And that, without us even being aware of that, most of the times.
It was already mentioned in a comment: for the example of your problem, a human would not sort that list of digits. He would just countdown from 4 to 1.
If the problem would provide different numbers, e.g. {5, 21, 48, 16}, the brain cores would "visually" detect the maximums and minimums in the list, and rearrange them in the correct order, without real comparisons (at least, we are not aware of them).
The human brain is definitely multi-core. But the cores are not independent like in a computer, which only exchange some data. They are permanently reconfigurable, and I suspect that these "cores" of the brain actually overlap, not only regarding data, but also regarding execution.
To understand the kind of computing done in "biological computers":
References: Rod_cell, Cone_cell, Optic_nerve
Math:
- 100 million rod cells;
- 7 million cone cells;
- Each human optic nerve contains between 770,000 and 1.7 million nerve fibers
Now you see, a max of 1.7 million optic nerves connect 107 million sensors to the brain. That is actually the "definition" of image / video compression. The eye (retina?) is a standalone computer in itself. If it is able to do video compression, then it MUST be able (my opinion) to sort a short list without the need to relay the data to the brain. That could be an explanation WHY we know an answer to a problem just looking at it - we receive the answer together with the problem - all work was done elsewhere.
It seems "obvious" that the biological computers perform mathematical comparisons at some level, it is just that we have no idea where and how they are made. Maybe in a low level "driver"? Maybe they are off-loaded to some other processing unit? A "hardware accelerator"? Maybe, hopefully, the future will tell us.
for loops
" would have made the entire code more efficient given that on the human level it does make things more efficient. – Sümer Kolçak Sep 27 '19 at 6:11