Menu

#5 Manual arraycopy implementation in Interleaving

open
nobody
None
5
2006-12-21
2006-12-21
No

Use the system class for this stuff, lot faster.

Index: gov/nasa/jpf/search/heuristic/Interleaving.java

--- gov/nasa/jpf/search/heuristic/Interleaving.java (revision 210)
+++ gov/nasa/jpf/search/heuristic/Interleaving.java (working copy)
@@ -65,9 +65,7 @@
int[] newThreads = new int[newSize];
newThreads[0] = lastRun;

- for (int i = 1; i < newSize; i++) {
- newThreads[i] = threads[i - 1];
- }
+ System.arraycopy(threads, 0, newThreads, 1, newSize - 1);

search.getNew().otherData = newThreads;

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.