All the following instructions do the same thing: set %eax to zero. Which way is optimal (requiring fewest mac
I tried to compare the performance of inline assembly language and C++ code, so I wrote a function that add tw
Background: While optimizing some Pascal code with embedded assembly language, I noticed an unnecessary MOV i
Is a switch statement actually faster than an if statement? I ran the code below on Visual Studio 2010's
I am working on some Java code which needs to be highly optimized as it will run in hot functions that are inv
I wrote these two solutions for Project Euler Q14, in assembly and in C++. They implement identical brute forc
I was looking for the fastest way to popcount large arrays of data. I encountered a very weird effect: Changin
Is if (a < 901) faster than if (a <= 900)? Not exactly as in this simple example, but there are slight p
Is there a faster way than x >= start && x <= end in C or C++ to test if an integer is between t
I'd like to comprehensively understand the run-time performance cost of a Docker container. I've fou
Consider the following simple speed test for arrayfun: T = 4000; N = 500; x = randn(T, N); Func1 = @(a) (3*a^
I am making some benchmarks with CUDA, C++, C#, Java, and using MATLAB for verification and matrix generation.
Often I want to check if a provided value matches one in a list (e.g. when validating): if (!acceptedValues.A
I often run into the case where I want to eval a query right where I declare it. This is usually because I nee
in the System.Linq namespace, we can now extend our IEnumerable's to have the Any() and Count() extension
I am doing a quick stress test on two (kinda) hello world projects written in node.js and asp.net-core. Both o
In numpy / scipy, is there an efficient way to get frequency counts for unique values in an array? Something
What is the most efficient way to map a function over a numpy array? The way I've been doing it in my cur
I've been using WebSockets for a while now, I have chosen to create an Agile project management tool for
Suppose I have a stringbuilder in C# that does this: StringBuilder sb = new StringBuilder(); string cat = "ca