First of all, you should try an other test.
String
is immutable so doing str = str + "t"
is actually not linear in time: adding only one character implies rebuilding the whole string everytime.
Plus because of the string pool in Java, I am not 100% percent sure String
is the best object to test concurrency on.
Second, concurrency adds complexity to a program and the risk of unplanned behavior such as deadlocks, race conditions... A bad concurrent design can well be less efficient that an average serial design.
So if you are happy with your program and have decent performance, do not multithread. If you are unhappy with the performance, first try to find out why and improve your serial design. Only then you can add multithreading to it, but you really need to know what you are doing.