by the way: those little performance runs inlcude gpu overhead, which was most of the time spent. the actual 100 iterations only took around 2 seconds on the gpu. on the cpu, there was less overhead, but runtime was slow. More sophisticated performance measurements are built into each version of the program. set the --time or -t flag for the relevant output.