commons-math
commons-math copied to clipboard
Avoid manual array copy to increase the performance
I am using this class for some heavy operation tasks and manual array copy is not helping us. I have tested this change and seems to bring in a minor improvement. And it does not break any existing code as well.
Coverage decreased (-0.004%) to 90.153% when pulling adc9ecdbb5d16d7856b88c321f7f1479e629c575 on abhijithtn:master into 19e0e29908fef67a0890f6a8513494e9963b2ae0 on apache:master.
I think the coverage decreased because of the extra condition in the if statement. An extra unit test would cover that, but not sure if there is any risk of cache being null (did not check the whole code).
I have tested this change and seems to bring in a minor improvement.
Could you share your tests? Perhaps code (using JMH would be even better), data used, and also environment?