Tim10
New Contributor
6 years agoSmall vs Standard C++ Execution Speed
Hi,
The following C++ code executes 4x more slowly in standard configuration (hello_world) compared to small configuration (hello_world_small).
I'm using a DE2-115 @ 50 MHz with 128 MB SDRAM @ 50 MHz.
What is the reason for this speed difference?
const short WIDTH = 320; // Pixels.
const short HEIGHT = 240; // Pixels.
const short FRAMES = 366; // Number of video frames.
short video [FRAMES][HEIGHT][WIDTH];
for (short f = 0; f < FRAMES; f++)
{
for (short y = 0; y < HEIGHT; y++)
{
for (short x = 0; x < WIDTH; x++)
{
video[f][y][x] = 0;
}
}
}Thanks,
Tim.