简体   繁体   中英

Executable slower in Cygwin under Windows than in Linux in VirtualBox

I have Fortran code with many .f files which generate a executable. I ran the simulation and executed the software successfully in Linux (in Virtual Box). When I did the same in a Cygwin environment in Windows, it is running successfully but a few seconds slow. The fortran code I am working on is an iterative code. each iteration ran slower by the order of milli seconds. when I ran the whole code for 1000 times , it delayed by seconds. I used the time package to know total execution in virtual box.It gave real 0m0.061s user 0m0.036s sys 0m0.020s

In windows with measure command of powershell:total execution time = 0.095 seconds

Every time Linux wins the race even though Virtual Box takes only half the cores of the processor and half the ram. Is this behavior normal or is something wrong?

It is normal. The fork implementation on cygwin is slow due to the amount of workaround to bypass Windows limitation.

Your repetitive compilation is probably wasting a lot of time during forks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM