Making fast_operators by moving loops to java code