Most siblings fight over who has to help to bring in the groceries, which happens in my family too, but when I was younger, I remember fighting with my sister over who had to bring the grocery bags…
During the development and testing of Datona Labs’ Solidity Smart-Data-Access-Contract (S-DAC) templates, we wanted to sort some small sets of small numbers, for example:
Of course we want to use as little gas (few cycles) as possible because blockchain languages like Solidity are very expensive to run compared with normal systems and the gas actually costs a measurable amount of money.
We presumed that the complexities of Quick Sort would be overkill for sorting a few small integers but useful for comparison purposes.
Insertion Sort is well known — the code is provided below.
Counting Sort uses the values of the data itself to drive the algorithm, and thus performs no comparisons. Unique Counting Sort further refines this by assuming that the numbers in the small set are unique.
In addition to the range of sorting algorithms, implementation in Solidity includes the following possible array data types for holding small numbers:
Regardless of a facility’s cost of power, fiber choices, location, security, compliance, or certifications, in order for Chicago metro data center providers to grow their client base they need to get…