Re: Another one
- From: "Avatar Zondertau" <avatarzt@xxxxxxxxx (please reply to newsgroup)>
- Date: Fri, 30 Dec 2005 18:58:15 +0100
> How about this one? It also produces an 'Operand size mismatch'
>
> mov Result+1, al // save to allocated string/last position
"byte ptr" fixes it:
mov byte ptr Result+1, al
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 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).
In any case i find myself coding this function often as well, so it
might be a potential Fastcode candidate.
--
The Fastcode Project: http://www.fastcodeproject.org/
.
- Follow-Ups:
- String functions benchmarks
- From: Adem
- String functions benchmarks
- References:
- Operand size mismatch
- From: Adem
- Re: Operand size mismatch
- From: Dennis
- Another one
- From: Adem
- Re: Another one
- From: Avatar Zondertau
- Re: Another one
- From: Adem
- Operand size mismatch
- Prev by Date: Re: Another one
- Next by Date: String functions benchmarks
- Previous by thread: Re: Another one
- Next by thread: String functions benchmarks
- Index(es):
Relevant Pages
|