Adaptive Transactional Memories: Performance and Energy Consumption Tradeoffs