J
JL
Hi all!
I experiment a very strange behaviour with one of my CF2 function.
In my program a function is called 256 times in a "for" loop. This function
fills some arrays and compute binary paths.
I noticed that the whole loop was very slow, so I checked the execution time
of each function call. The result is wierd : sometimes the function takes a
few milliseconds to complete, and sometimes it takes up to 1 second!
I first reduced the whole execution time by reducing the amount of memory
taken. This way I gained almost 30s! But the whole loop (256 function calls)
is still taking 10+ seconds to complete... (the same eVC4/c++ computing on a
WM2003 PDA takes 4 seconds to complete)
I noticed that with the first version of the program, with no optimization
of the memory, the number of loops that took 1 second was around 40 times.
When I reduced the memory taken by the program, the number of 1 second loops
was around 10. So it seems obvious that the time taken by each call depends
on the available memory.
Is there something with the garbage collector or anything else that could
slow down my function ? Anyone got an idea about it ?
Thank you for your help!
JL
PS : the program takes up to 6.5 MB, the 256 function calls increase the
taken memory from about 3.5 MB to 6 MB.
PPS : the indexes of the calls that take 1 second to complete aren't always
the same, but the more the function have already been called, the more a 1
second loop occurs...
I experiment a very strange behaviour with one of my CF2 function.
In my program a function is called 256 times in a "for" loop. This function
fills some arrays and compute binary paths.
I noticed that the whole loop was very slow, so I checked the execution time
of each function call. The result is wierd : sometimes the function takes a
few milliseconds to complete, and sometimes it takes up to 1 second!
I first reduced the whole execution time by reducing the amount of memory
taken. This way I gained almost 30s! But the whole loop (256 function calls)
is still taking 10+ seconds to complete... (the same eVC4/c++ computing on a
WM2003 PDA takes 4 seconds to complete)
I noticed that with the first version of the program, with no optimization
of the memory, the number of loops that took 1 second was around 40 times.
When I reduced the memory taken by the program, the number of 1 second loops
was around 10. So it seems obvious that the time taken by each call depends
on the available memory.
Is there something with the garbage collector or anything else that could
slow down my function ? Anyone got an idea about it ?
Thank you for your help!
JL
PS : the program takes up to 6.5 MB, the 256 function calls increase the
taken memory from about 3.5 MB to 6 MB.
PPS : the indexes of the calls that take 1 second to complete aren't always
the same, but the more the function have already been called, the more a 1
second loop occurs...