Let's compare the solutions of the serial and concurrent versions of all the methods we have implemented.
We executed the examples using the JMH framework (http://openjdk.java.net/projects/code-tools/jmh/), which allows you to implement micro benchmarks in Java. Using a framework for benchmarking is a better solution which simply measures time using methods such as currentTimeMillis() and nanoTime(). We have executed them 10 times in two different architectures:
- A computer with an Intel Core i5-5300 CPU with Windows 7 and 16 GB of RAM: This processor has two cores and each core can execute two threads, so we will have four parallel threads.
- A computer with an AMD A8-640 APU with Windows 10 and 8 GB of RAM: This processor ...