1. A method, comprising: performing by a computer: analyzing source code comprising a plurality of instructions for an application; identifying, based on said analyzing, a sequence of instructions in the source code that is configured to execute atomically; replacing the identified sequence of instructions with an alternate sequence of instructions, wherein the alternate sequence of instructions is executable to implement: determining, at runtime, one of a plurality of different transaction implementations for atomic execution of the identified sequence of instructions; attempting to execute the determined one of the different transaction implementations to atomically execute the identified sequence of instructions; determining, at runtime, that the determined one of the different transaction implementations failed; and in response to said determining that the determined one of the different transaction implementations failed, determining another one of the different transaction implementations to execute; wherein the analyzed source code does not include instructions to perform said determining one of a plurality of different transaction implementations.