Optimised temporary variable allocation.