CPU vs GPU in Matlab

Michael Croucher’s Walking Randomly covers numerical computing for engineers, using tools such as Mathematica and Matlab. However, his series of posts starting with MATLAB GPU / CUDA experiences and tutorials is recommended for any programmer considering GPU parallelism. Michael compares optimized multi-threaded CPU algorithms to massively parallel GPU equivalents when all their extra costs, such … Continue reading “CPU vs GPU in Matlab”

RNG Range Projection

RNG Range Projection is a new page discussing the pitfalls of projecting the output of a pseudo-random number generator with a small native range (specifically, the rand() function of MS Visual C++) into an arbitrary target range. This page essentially replicates the contents of a plain text file that used to be included with my … Continue reading “RNG Range Projection”

Uncontested Lock Performance

Recently I wondered about the performance cost of preemptively putting monitor locks on small library methods that might conceivably be called from multiple threads. That’s a great subject for a micro-benchmark, so I wrote a few tests in C# and Java and posted the results in Uncontested Lock Performance. As it turns out, standard locking … Continue reading “Uncontested Lock Performance”