1. A method for generating an efficient program utilizing software transactional memory operations contained in transactions along with logging of software transactional memory updates during compilation, the method comprising: identifying references to objects which are always bound to newly-allocated objects in transactions at a set of program points; and preventing software transactional memory operations on objects reached through the identified references, wherein the operations have no effect outside of the transactions.