It's a misleading question. There's short-term energy retention and long-term energy retention.
Short-term energy retention (where there is either little deceleration or when the deceleration point is primarily at the end of the engagement) is based on mass, airspeed, and aerodynamics (i.e. the more aerodynamic the plane, the less E it loses to form drag). Planes such as the Mossie, P-38, and even some bombers excel here due to their mass and general lack of torque.
Over the long term, fights are rarely flown in straight lines and typically planes will go through several phases of acceleration, deceleration, climbing, turning, and so forth. Mass becomes a negative attribute in this light and starts to work against E retention as the plane slows down. Because of this, long-term energy retention depends on wing-loading, acceleration, climb rate, and top speed - very, very different from short-term energy retention. Planes such as the Spitfires, Yaks, 109's, and other low-to-medium wing-loaded aircraft excel here.
Overall, the Spitfires (especially the 16 and the 8) have the best e-retention, followed by the Ki-84. The 109's and Yak-3 fall shortly thereafter.
Since the Ta 152 was brought up: The Ta 152 doesn't really so much have great energy retention as much as it is simply fast, builds up speed well in a dive, and handles well at low speed (which are all useful traits, but not the same as e-retention). However, you'll find that it lacks low wing loading and acceleration - the things that matter most for conserving energy. The Ta 152 fits between the two types of fighters above, leaning more towards the short-term end of the spectrum. However, put it into an extended fight with a Spitfire or Ki-84 - especially from a co-E starting point - and its flaws become apparent. This isn't always noticed, though, because a pilot experienced with the Ta 152's guns can many times end fights before they become prolonged.