64 bit humour



So okay it's 2012 and I'm using my 64 bit machine with 16GiB of ram........

I'm trying to work with a new programming language called 'FMEL' standing
for Fictional Movie Editing Language.

Anyways, I've written this movie program, but playback is just the pits. I
can't figure out why it's so slow....


See, all I did was declare a small array of string variables

String narationalText[1000];

//(Strings use the UTF32 standard, string variables are 2K characters by
default. Each string var takes 8kiB)

And I just declared some audio clips I want sounded during during different
movie sequences....

AudioClip clipArray[500];

//(Audio clips are 20k words in size).


It looks like I might have to store the video frames on disk, they're pretty
big. But since I'm just testing this
out right now, I'll just declare a small array.

VideoClip clipArray[500];

// Video clips are 4MB in size, so my clip array does take up 2GB, but
that's okay for now......

-> I know, I'll use it as a screen saver for a couple of hours, and see what
people think.....

for frameNo = 0 to 60*60*60*2
parallel {
displayFrame (frameNo)
if (FrameNo % 3600)
playAudioClip(clipArray[var++])
}

*****************************************************************
*****************************************************************

Meanwhile in cpu.......

Every other instruction executed is issuing a memory load to the data cache
causing the processor to stall due to port contention and data dependency
hazards. You see, the data cache is half full of immediate constants because
most constants
are > 16 bits in size, but the cpu only supports a 13 bit constant
field..... The instruction
pipeline is processing twice as many instructions as it should be......

And calls into that 8GiB shared video function library, arent working as
well as
they should be because the relative call instruction doesn't support enough
address bits,
meaning a slower form of calls are used.

The OS just decided to page some memory to disk to free up a little
memory....
Time to go for a coffee break while 100MB of memory swaps.....
Why is that option on anyway ?

******************************************************************

Guesstimate: adding address bits adds a proportion of bits to the average
size of immediate constants used.


















.