commons-math icon indicating copy to clipboard operation
commons-math copied to clipboard

Avoid manual array copy to increase the performance

Open jignaasu opened this issue 7 years ago • 2 comments

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.

jignaasu avatar Apr 13 '17 11:04 jignaasu

Coverage Status

Coverage decreased (-0.004%) to 90.153% when pulling adc9ecdbb5d16d7856b88c321f7f1479e629c575 on abhijithtn:master into 19e0e29908fef67a0890f6a8513494e9963b2ae0 on apache:master.

coveralls avatar Apr 13 '17 11:04 coveralls

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?

kinow avatar Apr 20 '17 01:04 kinow