i need to evoke other program from a *.cpp and i use system() function. i do it in a cycle and feel like system() spends much more time loading than actual other program function. i was wondering is there any way to speed up the process?
Yup, platform specific. Even when a lib lets you use the same command to execute a process on multiple platforms it's actually using preprocessor commands to determine the OS. That is unless the system is cheating by using Cygwin\MSYS.
What process are you calling that you need to loop like that?
Would a Batch\Bash file be better suited for this task?
i do monte carlo simulation with protein structure. need to minimize changing structures, so i change a structure within c++ and then need to minimize it and calculate energy and then to decide whether accept the structure or reject. i do it in our cluster, i dont know what platform is it :"(
Are the calculations too complex to do on your PC? I'm at Wikipedia now looking this up. C++ is generally very good at a lot of math and it doesn't take much to get it to work with large numbers.
I remeber this stuff. A guy was on here last week asking what would be a good thing to practice multithreading with and someone brought up this method.
I would say that unless you're trying to hit a rock the size of a softball in the Orion's Belt with a rocket from earth, C++ can probably do these calculations as a threaded app.
Can I ask what field this is in without you getting into trouble?