C tools and benchmarks
Leaker – a simple memory leak detector for C and C++ programs. Leaker will report leaked memory, mismatched allocation/deallocation functions, attempts to deallocate bad pointers, and writing off the end of dynamically allocated arrays. It is fast, portable, and easy to use. Leaker is designed particularly to help new C and C++ programmers get a handle on memory management errors.
SimpleHuffman – a short C program to build Huffman encodings for files. Includes some thoughts on optimization and an example of how runtime profiling can be used to find and eliminate hot spots.
SimpleCrypt – a simple file encryption application using the XXTEA block cipher.
CollatzMP – a miniature arbitrary precision numeric package with just enough functionality to compute the Collatz stopping time (number of steps for the Collatz sequence to end) for arbitrarily large numbers.
C I/O function performance – timings of the various C input and output functions. Short story: single-character I/O is massively slower than all other methods.
strlang – a simple imperative language designed to make string manipulation easy. strlang features built-in support for strings and maps and a minimalist syntax. The compiler provides full semantic checking and produces linearized C++ code. Includes full documentation and a conformance test suite.
Converting masm/Windows assembly to nasm/Linux – notes on the differences between Microsoft’s assembler and nasm.
Converting x86 to x86-64 assembly – what changes are necessary/advisable when programming for 64-bit x86 vs. 32-bit x86.
Using Linux/nasm with Kip Irvine’s x86 assembly book – how to get started using Linux and nasm with Irvine’s book.
nasm on MacOS X – peculiarities of assembly program on OS X (as compared to Linux).
masm to nasm – a conversion example
primes assembly benchmark – simple benchmark, with comparison to C code
64 bit assembly oddity – same primes benchmark, but with 64-bit versions of code being compared too.
Bytecode vs. Native Code – comparing pi calculation in Java, C# and C++.