🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #320

Re: Faster MOVE() replacement

#320
From: Arno Fehm
Date: Tue, 04 May 1999 00:00
61 lines
3657 bytes
First: My apologizes for spreading 'unuseable knowledge'. But it was my
real and proved faith that MMX moves are faster.

I'm working on a project, which has extensive use of MMX instruction.
Also of MOVQ. Switching of the MMX causes the frame rates to drop (e.g.
from 60 to 45); on my CPU as well as on others (like PII). I always
thought, this was mainly was because of the moves. And measurements on
my CPU (P55C) agreed. Heavily. Sorry again!

Robert AH Prins wrote:
> > I compared your optimized MOVE with my primitive MMX MOVE, and the
> > results for 64000 Bytes were 1.1msec against 0.6 msec! That is 56 MB/sec
> > against 100 MB/sec.
> > WHY does none of YOU, who HAVE the ability to write a professional MOVE
> > use these extended features? Because you think, there are still these
> > without MMX? We can support both!
> 
> Have you had a look at the Intel page,
> 
> <http://developer.intel.com/drg/pentiumII/appnotes/813/813.htm>
Thank you for citing this old clpb-thread. It was 'before my times', so
I did not now of this being discussed before. 
And this is the really first time, I hear that MOVQ might even be
SLOWER...
But as far as I can read your figures below, for this case MOVQ is never
slower in moving blocks. Only sometimes equal!
..But I see, the Intel page tells different truth...

> downloaded the program and run it? You will see that the advantage of MMX is
> virtually non-existant - in some cases it's worse!
May I correct? Forgive me, but the advantage IS existant!! On my CPU it
is! 100% sure, 100% faster (nearly).

> > And what about using 80 bit FP instructions to move memory? I once
> > heared, this would be possible, too; and could be even more faster than
> > these MMX instructions with only 64 bit!
> Yes it is, but unless Intel has changed something in the FILD/FIST
> instructions it's useless, as the pair cannot handle a number of bit
> patterns.
Ok.. let's forget about this.

> > I really would like do write such MOVEs, but I'm afraid, I cannot manage
> > all these aligning things and so on... But if there would be anybody
> > interested in a cooperation to develop an optimized 64 or 80 bit MOVE,
> > I'd join!
> You've got all the aligning you want in my code, it shouldn't be too hard to
> change it into 8/16 byte alignements in stead of the 4-bytes I use...
Well, I really was going to do so. But this all has discouraged me a
bit. If for 80% of all CPUs, MOVQ shows no effect, why the effort?

Sorry again for (indirectly) blaming you for being old-fashioned, I just
hoped I could do some improvements!

regards
-- 
Arno Fehm (afehm@bigfoot.de)

------------------------------------------------------------------------
Member of Grey Dreams Design: visit http://GreyDreams.home.pages.de !!!!
He who can destroy a thing has the real control over it. (Frank Herbert)
------------------------------------------------------------------------
Technical Details
Message-ID: <372F2DBC.60EF2383@bigfoot.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7gjtqc$kgq$1@nnrp1.dejanews.com> <372DD2D2.5DF86734@bigfoot.de> <7gm5jc$i7l$1@nnrp1.dejanews.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111659,f6859b034dc1da2f
X-Google-Attributes: gid111659,public
X-Google-Thread: 108ebd,f6859b034dc1da2f
X-Google-Attributes: gid108ebd,public
From: Arno Fehm <afehm@bigfoot.de>
Subject: Re: Faster MOVE() replacement
Date: 1999/05/04
Message-ID: <372F2DBC.60EF2383@bigfoot.de>
X-Deja-AN: 473988172
Content-Transfer-Encoding: 7bit
References: <7gjtqc$kgq$1@nnrp1.dejanews.com> <372DD2D2.5DF86734@bigfoot.de> <7gm5jc$i7l$1@nnrp1.dejanews.com>
Organization: Regionales Rechenzentrum Erlangen, Germany
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: comp.lang.pascal.borland,borland.public.turbopascal