1. A computer-readable medium having computer-executable instructions for causing a computer to perform steps comprising: provide a transactional memory system; transform a first section of code containing an original sequential loop into a second section of code containing a parallel loop that uses a plurality of transactions to preserve an original input to output mapping; and execute the second section of code using the transactional memory system, with at least some of the plurality of transactions being executed on different threads.