Simple debugging and benchmarking code