Why is my multi-thread C code behaving differently inside a Swift project?
I developed a C program aimed to load data from a big file (several gigabytes), using threads to get faster. The code executes as fast as expected when I run it from the Terminal with gcc, it gets faster with more threads, until it reaches a maximum performance in terms of execution time. When I add the code to my Swift project in Xcode, exactly the same C code, and run it, the performances are way different. With one thread it is approximately the same execution time, but with more threads the execution time increase drastically.