Results

The test program is compiled with Microsoft (R) C/C++ Optimizing Compiler Version 19.13.26132 for x86 (Visual Studio 2017 Community Edition).

Number of threads

Memory fill, msec

Memory copy, msec

Dump to files, msec

1

18465

674

1448

2

9313

339

982

3

6245

230

692

4

4789

183

650

5

4788

185

465

6

4725

207

452

7

4748

238

488

8

4705

217

495

9

4776

199

462

Conclusions

It can be seen that a program manipulating multiple threads can accelerate not only CPU-used code execution (like random values generating) but simple I/O operation like memory copy or writing to multiple files.

As expected, using the number of threads exceeding the CPU core count doesn't have any effect. Try to test it in hyperthreading mode.