Faster Sorting in JavaScript

JavaScript is taking over the world as the language of the web. When in comes to sorting, JavaScript isĀ about 9 times slower than C++ and C#, but is slightly faster than Python 3.6, as I’ve shown in the previous postĀ Sorting Speed of Several Languages. By default, JavaScript sorts arrays of strings. If you try to […]

Read more "Faster Sorting in JavaScript"

C++ Sorting Algorithms

See the link below to explore interactively the above graph in detail. As you scroll through the graph, individual performance data points are shown, with array size and run time in seconds for each of the C++ sorting algorithms: Interactive Graph of Sorting Algorithms: Time vs. Array Size Standard STL sort is able to sort […]

Read more "C++ Sorting Algorithms"

CPU Parallel Random Number Generator

Intel’s 2017 MKL random number generator functions do not provide parallel functions, but provide mechanisms to support multi-threaded generation. Some of these algorithms are bound by memory performance and run significantly faster when the array fits in the processor cache. These algorithms should scale well running on multiple cores when each array fits in non-shared […]

Read more "CPU Parallel Random Number Generator"

GPU Random Number Generators

NVIDIA has implemented several pseudo-random number generation (PRNG) algorithms that run on its family of powerful Graphics Processor Units (GPU). The GPU accelerates these algorithm by running them on its many computational cores, taking advantage of parallel computation, local embedded memory and high bandwidth external memory. The following graph compares performance of these algorithms, generating […]

Read more "GPU Random Number Generators"