Timeline for Addition of Integer 2D array elements using multi-threading in java slower than sequential addition
Current License: CC BY-SA 3.0
16 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 6, 2014 at 18:16 | audit | Suggested edits | |||
| Jan 6, 2014 at 18:39 | |||||
| Dec 31, 2013 at 9:03 | audit | Suggested edits | |||
| Dec 31, 2013 at 9:14 | |||||
| Dec 20, 2013 at 15:26 | vote | accept | Sahil | ||
| Dec 20, 2013 at 15:26 | vote | accept | Sahil | ||
| Dec 20, 2013 at 15:26 | |||||
| Dec 20, 2013 at 15:26 | vote | accept | Sahil | ||
| Dec 20, 2013 at 15:26 | |||||
| Dec 20, 2013 at 15:25 | vote | accept | Sahil | ||
| Dec 20, 2013 at 15:26 | |||||
| Dec 20, 2013 at 13:55 | answer | added | JVMATL | timeline score: 1 | |
| Dec 20, 2013 at 6:06 | vote | accept | Sahil | ||
| Dec 20, 2013 at 15:25 | |||||
| Dec 20, 2013 at 6:00 | comment | added | Sahil | @JamesMontagne Thanks! I agree. It did improve the time and gave me expected results with input sizes of millions of elements. Even though the program did not run four times as expected by multi-threaded, it did run 2-2.5 times faster. Any other suggestions? | |
| Dec 20, 2013 at 5:57 | comment | added | Sahil | Hi @BrantUnger, I do not agree with what you said. The way I am calculating the time is by getting the System time before the code started executing and System time when the code stopped executing. I think this is how it should be done. When I tried what you said, the time it took was the same. But thanks for the input! | |
| Dec 20, 2013 at 5:19 | answer | added | Makoto | timeline score: 2 | |
| Dec 20, 2013 at 5:04 | comment | added | James Montagne | That seems like a really tiny data set to benchmark. With so little actual calculation time, just the extra setup code in the threads could be the difference. Try a very large amount of data and see if the results differ. | |
| Dec 20, 2013 at 5:02 | comment | added | Brant Unger | Unless I am a retard, you are adding up the time each thread spends....and combining. Adding them together gives you a value close to 4 times longer than what it really took, because they run concurrently/parallel, not one after the other. | |
| Dec 20, 2013 at 4:51 | history | edited | Sahil | CC BY-SA 3.0 |
added 307 characters in body
|
| Dec 20, 2013 at 4:39 | review | First posts | |||
| Dec 20, 2013 at 4:39 | |||||
| Dec 20, 2013 at 4:20 | history | asked | Sahil | CC BY-SA 3.0 |