improved speed tests and added stub for CUDA