Physics experiment: simulation of moving electrons, hydrogen and boron ions in a magnetic field
Computer simulation of idea 10
|Trying to make the program faster:
My main computer is: Intel (R) Core i3-4130T CPU @ 2,90 GHz 2,90 GHz Ram 4,00 GB Sistema operativo de 64 bits, procesador x64, Windows 10 Home.
When the program is started it waits for a key to be pressed and uses then about 0 % of the CPU and 0,1 % of the memory. Running it takes about 25,6 % if the CPU and 0,1 % of the memory.
program but in the "visual object" environment of Delphi 4 has a size of
301 kb (19 x bigger).
Running it takes also about 25,6 % if the CPU and 0,1 % of the memory.
Running the simulation program also takes about 25,6 % of the CPU and 0,1 % of the memory, and it hardly makes any difference when the simulation is pauzed or running. (by the way, when the simulation starts it shows up a welcome screen and uses still only 0 % of the CPU).
computer: Intel (R) Core due CPU E8500 @ 3,16 GHz 3,17 GHz Ram
3053 MB 32 bits Windows Vista
Simulation program running on the 2e computer: 50 % CPU 272 Kb memoria.
Running the simulation program on both computers -> more or less the same, the speed on the main computer is about 5 % higher than on the 2e computer (but not very precisely measured).
3e computer: eMachine E520 Intel Cpu 575@ 2,00 Ghz
2,00 Ghz, 4,00 Gb
Running the simulation program on the main and the 3e computer -> the speed on the main computer is about 1,6 times higher than on the other computer
4e computer: Advent Intel N270 @ 1,60 GHz 1,60 Ghz
1,99 GB Ram Windows Xp.
Running the simulation program on the main and the 3e computer -> the speed on the main computer is about 2 times higher than on the 4e computer.
Compiling the test program in the programming language Lazarus (15 MB) and running the loops took also about 40 seconds on the main computer. Running the loops in the most simple Pascal program(69 KB) in Lazarus took about 55 seconds on the main computer.
goes about two times faster.
I managed to compile the simulation program in Lazarus... At the moment I will continue in Delphi 4, because used to it. If necessary can change it to Lazarus, which is multi-platform.
Conclusion so far: