Reduced the number of function calls in NativeCalculator to improve performance