I guess the machine that does this can't ever run out of ink.
Instead, you'll just get hanging chads.
I guess the machine that does this can't ever run out of ink.
Instead, you'll just get hanging chads.
Would you get extra credit for enterprisyness?
function GetOccurrancesOf (text, sub_text)
wrap text in XML
submit to GetOccurrancesOf web service
parse returned XML
return answer
Skizz
In addition to the unpredictable branches, the memory is not being accessed sequentially. Some processors (Pentium4 for example) can detect sequential memory access and prefetch the memory automatically. I doubt there's much that can improve the speed as this is doing very little computation for each memory access so it is severly memory limited.
It does look like an optimisation attempt without any profiling.
Skizz
I remember back in my university days you could print to a laser printer for a small cost. One day, I took my latest printout home and didn't realise for some time that the letter 'e' was missing. It turned out the laser printer's hard disk containing all the font data had a bad sector exactly where the 'e' was stored.
Skizz