Computing an average or two numbers seems simple and innocent enough of an operation. Here is an example from a C++ computer science text book: int m = (a+b) / 2 where a and b are also int’s, which are signed 32-bit values on most computers. This code seems innocent enough: add two integers, divide […]
Read more "Average Fun"
In my previous blog https://duvanenko.tech.blog/2020/02/03/faster-c-sorting/ I benchmarked standard C++ Sort algorithm on a single core at 11 Million 32-bit integers per second. Parallel C++ Sort runs at 93 Million integers per second on a 48-core Xeon CPU on AWS. I also benchmarked Parallel Merge Sort on the same machine, which reaches over 600 Million integers […]
Read more "Giga Sort – Sorting at 10X Faster Than C++ Parallel Sort"
Functional programming paradigm has infiltrated every modern programming language. Functional is considered a safer coding method, and lends itself to parallelism as well. A typical function in function programming style takes an input and returns an output. Input can be a single item or an array. Output can be either as well. This enables cascading […]
Read more "Feeling In-Place with Functional"
Functional programming has been around since the late 1950’s, based on lambda calculus concepts dating back 100 years. It has been embraced by just about every modern language, because of guarantees it offers. Immutability is one property of functional programming, where functions never change a variable, but instead return a new one. When an function […]
Read more "Computer Architecture is Non-Functional"
My earlier Faster Sorting in C# blog described a Parallel Merge Sort algorithm, which scaled well from 4-cores to 26-cores, running from 4X faster to 20X faster respectively than the standard C# Linq.AsParallel().OrderBy. In this blog, I’ll describe an even faster Parallel Merge Sort implementation – by another 2X. Performance of the New Approach C# […]
Read more "Even Faster Sorting in C#"
What Is It? Computing constantly provides space-time trade-offs. To make an algorithm faster, more space can be used. Or, if space is at a premium, then a slower and more space efficient algorithm can be used. This kind of a trade-off occurs in every aspect of computing, such as software development and chip design. In […]
Read more "To In-Place or To Not-In-Place"
The number of cores in modern processor is growing. For quite a while we were stuck at 2 or 4 cores. But, lately the number of cores have grown to 6 and 8 even for consumer processors, and to 14 cores for Intel Xeon workstation and cloud CPUs, and 32 cores for AMD desktop and […]
Read more "Parallelism: Perform No Worse"
I wrote a blog “Faster List.ToArray() and Copying in C#” a while back, which showed several ways to copy from List to Array faster. One of these ways was implemented in the HPCsharp nuget package and increased performance by 4X using multiple processor cores. In this blog I’ll show how to do the same for […]
Read more "Faster Array.ToArray() and Copying in C#"
Standard deviation is one of the basic tools within a statistician’s toolchest, to measure variability within a data set. The basic formula can be found on wikipedia. Within the formula, one of the summations takes every data point subtracts the average value and then squares it. This blog will explore how this squaring affects standard […]
Read more "How Standard Deviation Measures Warped Data"
Standard deviation is a core statistical algorithm used to measure variability of a data set. It is used in data science extensively, to provide useful information about the data. The computation itself uses summation twice within the algorithm: once to compute the mean (average) of the data set, and another to sum the square of […]
Read more "Parallel Standard Deviation"