All Questions
2 questions
1
vote
1
answer
238
views
«Heavy» object initialization: within each thread or outside and then pass it to the threads as parameter?
Let say there is an array of strings, I have to process. I'm using a «heavy» third-part object which gets the string and performs its analysis. In order to optimize a performance, I create a number of ...
5
votes
1
answer
12k
views
Performance of sharing single object with multiple threads in Java
In Java, if I create an object that has a method to do something, and I pass that object to multiple threads which call the method, is there a performance difference from creating an individual ...