Author |
Message |
Chris Rossa #1 / 32
|
486 dx4/100 faster than p-133?
Hi I am experiencinga very strange phenomenon. I have written some code which writes a lot of lines to an offscreen buffer to mode 12h and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a 486 dx4/100. The same routine took 127 ticks on a pentium 133. I ran the program under both dos and win 95 and the results were consistent. I then rewrote the routine in c hoping that watcom could speed it up for the pentium. The results were 42 for the 486 and 120 for the p-133. I am beggining to wonder if there are instructions on the pentium which are a lot slower than the 486. In general the pentium is a lot faster but this particular routine runs 3 times slower. Any ideas why? I cannot post the source as it is being used in a commercial project.
|
Mon, 14 Sep 1998 03:00:00 GMT |
|
|
Bj?rn Mor #2 / 32
|
486 dx4/100 faster than p-133?
Quote: >Hi I am experiencinga very strange phenomenon. I have written some >code which writes a lot of lines to an offscreen buffer to mode 12h >and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a >486 dx4/100. The same routine took 127 ticks on a pentium 133. I ran >the program under both dos and win 95 and the results were consistent. >I then rewrote the routine in c hoping that watcom could speed it up >for the pentium. The results were 42 for the 486 and 120 for the >p-133. I am beggining to wonder if there are instructions on the >pentium which are a lot slower than the 486. In general the pentium is >a lot faster but this particular routine runs 3 times slower. Any >ideas why? I cannot post the source as it is being used in a >commercial project.
... {*filter*}still you want help for free... ;) I've noticed the same thing. I have assembler code that runs about 3 times slower on a P-90 compared to a 486DX33. I couldn'd believe my eyes when I first saw it, but it's true. Of coarse I can understand if some instructions will run a bit slower on a Pentium while other will run a lot faster, but this really confuses me, because the overall should be a faster execution. The code I'm using is much like compiled bitmaps, and the core of it looks like: LODSD (Isn't very good on a Pentium) MOV [EDI+xxx32bit],AL (Should be equal or faster) MOV [EDI+xxx32bit],AH ( " ) SHR EAX,16 ( " ) MOV [EDI+xxx32bit],AL ( " ) MOV [EDI+xxx32bit],AH ( " ) Well, I think it's just to take a look in "Zen of code optimisation" and the answer propably will be printed there. /Bjorn Moren
|
Mon, 14 Sep 1998 03:00:00 GMT |
|
|
Paul Hsie #3 / 32
|
486 dx4/100 faster than p-133?
Quote:
> Hi I am experiencinga very strange phenomenon. I have written some > code which writes a lot of lines to an offscreen buffer to mode 12h > and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a > 486 dx4/100. [...]
Graphics card. -- Paul Hsieh
What I say and what my company says are not always the same thing
|
Mon, 14 Sep 1998 03:00:00 GMT |
|
|
Xu Yifen #4 / 32
|
486 dx4/100 faster than p-133?
/> /> Hi I am experiencinga very strange phenomenon. I have written some /> code which writes a lot of lines to an offscreen buffer to mode 12h /> and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a /> 486 dx4/100. The same routine took 127 ticks on a pentium 133. I ran /> the program under both dos and win 95 and the results were consistent. /> I then rewrote the routine in c hoping that watcom could speed it up /> for the pentium. The results were 42 for the 486 and 120 for the /> p-133. I am beggining to wonder if there are instructions on the /> pentium which are a lot slower than the 486. In general the pentium is /> a lot faster but this particular routine runs 3 times slower. Any /> ideas why? I cannot post the source as it is being used in a /> commercial project. Hi, I don't think your test is proper, do you ever test your video card on 486 is faster than the one on pentium ? I think your video card on pentium is more slower than the one on 486! hope this helps. Xu Yifeng
|
Tue, 15 Sep 1998 03:00:00 GMT |
|
|
Mark Feldm #5 / 32
|
486 dx4/100 faster than p-133?
Quote: Rossall) writes: >Hi I am experiencinga very strange phenomenon. I have written some >code which writes a lot of lines to an offscreen buffer to mode 12h >and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a >486 dx4/100. The same routine took 127 ticks on a pentium 133. I ran >the program under both dos and win 95 and the results were consistent. >I then rewrote the routine in c hoping that watcom could speed it up >for the pentium. The results were 42 for the 486 and 120 for the >p-133. I am beggining to wonder if there are instructions on the >pentium which are a lot slower than the 486. In general the pentium is >a lot faster but this particular routine runs 3 times slower. Any >ideas why?
486 optimisation is totally different to Pentium optimisation....BIG time! A good text on this kinda stuff is Michael Abrash's "Zen of Code Optimisation". ftp.intel.com has a file called opt32.doc which is also very good. The Pentium Users Guide (part of the IAL, available on cd-rom for free from Intel I believe) also goes into a lot of detail. Of course, without seeing the inner loop at least it's impossible to tell whether this is what's happening or whether you've simply timed your code wrong. Mark Feldman
|
Tue, 15 Sep 1998 03:00:00 GMT |
|
|
Thierry Trembla #6 / 32
|
486 dx4/100 faster than p-133?
Quote:
> /> > /> Hi I am experiencinga very strange phenomenon. I have written some > /> code which writes a lot of lines to an offscreen buffer to mode 12h > /> and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a > /> 486 dx4/100. The same routine took 127 ticks on a pentium 133. I ran > /> the program under both dos and win 95 and the results were consistent. > /> I then rewrote the routine in c hoping that watcom could speed it up > /> for the pentium. The results were 42 for the 486 and 120 for the > /> p-133. I am beggining to wonder if there are instructions on the > /> pentium which are a lot slower than the 486. In general the pentium is > /> a lot faster but this particular routine runs 3 times slower. Any > /> ideas why? I cannot post the source as it is being used in a > /> commercial project. > Hi, > I don't think your test is proper, do you ever test your video card on 486 > is faster than the one on pentium ? > I think your video card on pentium is more slower than the one on 486! > hope this helps. > Xu Yifeng
Do you read messages? The guys said:"in an OFFSCREEN buffer
|
Tue, 15 Sep 1998 03:00:00 GMT |
|
|
Robert J. Fenn #7 / 32
|
486 dx4/100 faster than p-133?
Quote:
> > /> > > /> Hi I am experiencinga very strange phenomenon. I have written some > > /> code which writes a lot of lines to an offscreen buffer to mode 12h > > /> and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a > > /> 486 dx4/100. The same routine took 127 ticks on a pentium 133. I ran > > /> the program under both dos and win 95 and the results were consistent. > > /> I then rewrote the routine in c hoping that watcom could speed it up > > /> for the pentium. The results were 42 for the 486 and 120 for the > > /> p-133. I am beggining to wonder if there are instructions on the > > /> pentium which are a lot slower than the 486. In general the pentium is > > /> a lot faster but this particular routine runs 3 times slower. Any > > /> ideas why? I cannot post the source as it is being used in a > > /> commercial project. > > Hi, > > I don't think your test is proper, do you ever test your video card on 486 > > is faster than the one on pentium ? > > I think your video card on pentium is more slower than the one on 486! > > hope this helps. > > Xu Yifeng > Do you read messages? The guys said:"in an OFFSCREEN buffer
You are starting to see why asm programming is becoming less practicle with every release of a new CPU in the INTEL and PowerPC families. Each CPU is optimized differently and you will never be able to write one asm routine that is lightning fast on all and as a matter of fact you will run into cases where one fast routine on on CPU is slower on another! Case in point int the new PentiumPro CPUs and 16-bit code. Robert
|
Tue, 15 Sep 1998 03:00:00 GMT |
|
|
Henk van Kooi #8 / 32
|
486 dx4/100 faster than p-133?
Quote:
> > /> > > /> Hi I am experiencinga very strange phenomenon. I have written some > > /> code which writes a lot of lines to an offscreen buffer to mode 12h > > /> and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a > > /> 486 dx4/100. The same routine took 127 ticks on a pentium 133. I ran > > /> the program under both dos and win 95 and the results were consistent. > > /> I then rewrote the routine in c hoping that watcom could speed it up > > /> for the pentium. The results were 42 for the 486 and 120 for the > > /> p-133. I am beggining to wonder if there are instructions on the > > /> pentium which are a lot slower than the 486. In general the pentium is > > /> a lot faster but this particular routine runs 3 times slower. Any > > /> ideas why? I cannot post the source as it is being used in a > > /> commercial project. > > Hi, > > I don't think your test is proper, do you ever test your video card on 486 > > is faster than the one on pentium ? > > I think your video card on pentium is more slower than the one on 486! > > hope this helps. > > Xu Yifeng > Do you read messages? The guys said:"in an OFFSCREEN buffer
An offscreen buffer on the videocard using mode 12h if the videocard is an isa type and 8 bits how fast will it be?? Henk van Kooij
|
Wed, 16 Sep 1998 03:00:00 GMT |
|
|
Chris Rossa #9 / 32
|
486 dx4/100 faster than p-133?
Quote:
>> Hi I am experiencinga very strange phenomenon. I have written some >> code which writes a lot of lines to an offscreen buffer to mode 12h >> and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a >> 486 dx4/100. [...] >Graphics card.
No I don't think so. I am updating a virtual screen in RAM memory and only blitting it to the video card after I have finsihed updating the buffer. The card on the 486 is a cirrus logic 5428 on vesa local bus and on the pentium there is an s3 based pci card. -Chris
|
Wed, 16 Sep 1998 03:00:00 GMT |
|
|
Chris Rossa #10 / 32
|
486 dx4/100 faster than p-133?
Quote: >You are starting to see why asm programming is becoming less practicle >with every release of a new CPU in the INTEL and PowerPC families. Each >CPU is optimized differently and you will never be able to write one asm >routine that is lightning fast on all and as a matter of fact you will run >into cases where one fast routine on on CPU is slower on another! Case in >point int the new PentiumPro CPUs and 16-bit code. >Robert
I tried writing the routine in pure C and letting Watcom optimize it as best it can for the pentium. I still get roughly the same results. The 486 is roughly 3 times faster with this particular routine. -Chris
|
Wed, 16 Sep 1998 03:00:00 GMT |
|
|
Dion Barrie #11 / 32
|
486 dx4/100 faster than p-133?
Quote:
> Hi I am experiencinga very strange phenomenon. I have written some > code which writes a lot of lines to an offscreen buffer to mode 12h > and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a > 486 dx4/100. The same routine took 127 ticks on a pentium 133. I ran > the program under both dos and win 95 and the results were consistent. > I then rewrote the routine in c hoping that watcom could speed it up > for the pentium. The results were 42 for the 486 and 120 for the > p-133. I am beggining to wonder if there are instructions on the > pentium which are a lot slower than the 486. In general the pentium is > a lot faster but this particular routine runs 3 times slower. Any > ideas why? I cannot post the source as it is being used in a > commercial project.
__________________________ The reason why the pentium is taking longer is because of the way it was designed. The 486, 386, 286, and the like all excell at integer math and are bogged down when doing float point calculations. The opposite is true with the Pentium Series of chips. They designed their processor's architechture to excell at Float point calculations. This was done because of the growing need to do float point calculations for graphics. Viper out.....
|
Thu, 17 Sep 1998 03:00:00 GMT |
|
|
Dick Wesseli #12 / 32
|
486 dx4/100 faster than p-133?
Quote: >Hi I am experiencinga very strange phenomenon. I have written some >code which writes a lot of lines to an offscreen buffer to mode 12h >and I have timed it. The routine takes 37 int 8 ticks (18.2 hz) on a >486 dx4/100. The same routine took 127 ticks on a pentium 133. I ran >the program under both dos and win 95 and the results were consistent. >I then rewrote the routine in c hoping that watcom could speed it up >for the pentium. The results were 42 for the 486 and 120 for the >p-133. I am beggining to wonder if there are instructions on the >pentium which are a lot slower than the 486.
Possible. When there is a conflict between the D and I caches the pentium runs some code slower than a 486/ A particular cache line can be in only one of the two caches at a time. If you mix code and (constant) data in the same cache line then the pentium is constantly flushing caches which makes it slower than a 486. Such a conflict could occur - for instance - when compiling switch statements. If the compiler places the jump table for the switch near the jump that executes the switch then pentium will first load the cache line into the I cache - to get the jump instruction - then it will dump the I cache line and load the same line into the D cache - to access the table. If the code that is reached via the switch is also near the jump table then the cache line will again be dumped and loaded back into the I cache. Same for other types of constant lookup tables that are placed in the code segment. However, I don't think that's what going on here. You say that both your own hand-coded routine and a C-version run slower on the pentium than on a 486 and chances of *both* versions running into a cache conflict are rather small.
|
Thu, 17 Sep 1998 03:00:00 GMT |
|
|
Xu Yifen #13 / 32
|
486 dx4/100 faster than p-133?
Quote:
> Do you read messages? The guys said:"in an OFFSCREEN buffer
BTW, please remember that the OFFSCREEN buffer is still in video card. Regards, XuYifeng
|
Fri, 18 Sep 1998 03:00:00 GMT |
|
|
Dion Barrie #14 / 32
|
486 dx4/100 faster than p-133?
The reason why the pentium is taking longer is because of the way it was designed. The 486, 386, 286, and the like all excell at integer math and are bogged down when doing float point calculations. The opposite is true with the Pentium Series of chips. They designed their processor's architechture to excell at Float point calculations. This was done because of the growing need to do float point calculations for graphics. Viper out.....
|
Fri, 18 Sep 1998 03:00:00 GMT |
|
|
Bruce DeViss #15 / 32
|
486 dx4/100 faster than p-133?
: Do you read messages? The guys said:"in an OFFSCREEN buffer Offscreen can still be video RAM. Usually faster than onscreen, but slower than conventional RAM. -- __ Bruce DeVisser BMD Software Engineering 905-857-5653
|
Sat, 19 Sep 1998 03:00:00 GMT |
|
|