Summary: | [patch] use System.array copy in jacobi solver as, being native, is more performant. | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Dave Brosius <dbrosius> |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P2 | ||
Version: | Nightly (Please specify date) | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux | ||
Attachments: |
use System.arraycopy
add arraycopy for second loop |
Description
Dave Brosius
2010-12-09 23:53:35 UTC
Created attachment 26390 [details]
use System.arraycopy
rather than manual copying.
Can't one do the same to the first loop entry? i.e: newX[i] = _B[i]; As far as I can tell, it does not matter if newX is overwritten before starting the loop. Likewise at the end, there is another copy loop: for (i = 0; i < _n; i++) { _rS[i + 1] = newX[i]; } which might benefit from System.arraycopy. If FindBugs did not find the last one, then perhaps it needs tweaking ;-) The second one is perhaps harder (but even better if Findbugs can find it). Created attachment 26391 [details]
add arraycopy for second loop
converting newX[i] = _B[i]; to a arraycopy probably is counter productive given that the loop is used for other things as well, but the third one is certainly valid.
Thanks, applied - except I had to change _rs => _rS in the second part of the patch. URL: http://svn.apache.org/viewvc?rev=1049262&view=rev Log: Bug 50450 - use System.array copy in jacobi solver as, being native, is more performant. Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/Spline3.java jakarta/jmeter/trunk/xdocs/changes.xml This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2440 |