C/C++

  • June 17, 2012

    2D images, 3D volumes, and other multi-dimensional data frequently require loops that sweep through an array to compute statistics, normalize values, or apply transfer functions. Maintaining a multi-dimensional array within a single linear array is a common performance technique. Popular "hand optimizations" fiddle with array indexing and pointer math to improve performance, but how well do they work? This article benchmarks nine common multi-dimensional array loop and indexing methods and four common compilers to find the fastest method to loop through multi-dimensional arrays quickly.

  • March 7, 2012

    API functions to get the CPU time used by a process differ between Windows, Linux, OSX, BSD, Solaris, and other UNIX-style OSes. This article provides a cross-platform function to get the process CPU time, and explains what works on what OS.

  • April 7, 2012

    API functions to get the real time (wall-clock time) at sub-second resolution differ between Windows, Linux, OSX, BSD, Solaris, and other UNIX-style OSes. This article provides a cross-platform function to get the real time, and explains what works on what OS.

Syndicate content
Nadeau software consulting
Nadeau software consulting