You have too many sequential operations (append) which is not parallelizable on the GPU. CPU is faster with sequential compuations. You should be able to do all the appends with the index function, then the GPU will be faster.