The language NESL aims to facilitate GPU programming. In order to utilize the computation power of GPUs, NESL programs must be translated into efficient low-level code for execution. We propose a new translation technique. In NESL, apply-to-each is the main construct to extract parallel computation capability of GPUs. The result of apply-to-each is a sequence of elements. In traditional translation, the order of the elements in a sequence is always preserved. However, sometimes, the order need not be preserved and hence a faster method (which may not preserve the order of elements) for calculating the sequence may be employed. We propose the order analysis to determine if the order of elements in a sequence needs to be preserved. Order analysis is based on the taint analysis. In our experiments, we obtained 8.76x speedup on average.