Home > Back-end >  Bat called exe program is a matter of time
Bat called exe program is a matter of time

Time:09-30

The same program I call in the bat compile link good exe
, use % % time measured time far more than in the program itself
Add test execution time measured in the code, a lot more

Who knows why

Work needs, is more sensitive to time

CodePudding user response:

This is very normal ah, the inside of the timing, is refers to the process to enter the main function is up and running, to exit the main function of time,
Outside the program timing, in addition to containing just within the program timing, including Windows PE loader, search disk file, load EXE program into memory, and load the EXE dependent DLLS to the memory of the time, and EXE and DLL global variables, outside of the main function of the initialization of an object, and so on time,

Therefore, in general, outside the program timing time, affirmation is greater than the program timing in time,

CodePudding user response:

Because the program is running need to initialize the first, this is it takes time, running speed in your code, because has been initialized, so minus the initialization time

CodePudding user response:

Is this:
Need to be dynamically constructed a c program in Java, like a.c
Then using vc compiler compiler, perform

We put the program compiled and executed in the bat script

Is here the most time consuming
What are the other good way
  • Related