String functions benchmarks



Avatar Zondertau wrote:

Avatar,

Thank you for your help.

Actually i'm doubtful if for these functions assembler gives a large
benefit. They don't seem to be very optimized. For example i think the
XLAT instruction is probably inefficient; many rarely used high-level
opcodes (like LOOP and REP MOVS, so probably also XLAT) have a slow
implementation in modern CPUs.

You might be more than right. I am a complete illiterate when it comes to assembler.

But, using the bechmarking tool they have supplied, their results
are quite impressive. And, if their code can be improved upon, well
that would be fantastic.

You can see a screenshot of that in attachments where I have done 15-cycle benchmark.

You might be better off coding these things in Pascal (leaving you
with more readable code that is only slightly less, if at all,
slower) or using more optimized assembly (you can suggest them
as Fastcode challenges, though it might take some time before
the implementations arrive).

Fastcode is really deperately needed for these (and more) string functions.

In any case i find myself coding this function often as well, so it
might be a potential Fastcode candidate.

Would be great --including others.

Incidentally, I seem to like the way they presented the results;
I might want to write something like that (may be a little
more generic). Would that be useful?

Cheers
Adem
.