Enhance performance for Java/C# targets