P4 2.2 ghz slower than P31.2 ghz. Dos application help?

Started by Tom Eldredge, March 22, 2005, 08:45:14 PM

Previous topic - Next topic

Tom Eldredge

Gentlemen,

A subscriber at the Power Basic windows forum suggested I post my question here because you folks are more intimately familiar with the internal workings of the CPU's. 

I am very puzzled. I need to upgrade to a newer (available) motherboard and CPU to run a DOS based compiled Power Basic 3.5 compiled program which does intensive outputs and inputs to a pci based dual parallel port and a lot of math.  I am trying to match the speed of an older Aopen Pentium III based motherboard with a new Aopen motherboard, which employs the Pheonix Award Bios 6.00 and an Intel P4 processor.   I choose to run under DOS because it is a real time operating system and this program runs a metal cutting machine.  The new motherboard with the P4 runs the program at a noticeably slower speed. I have also tried celeron cpu's running 2.4 ghz and 2.8 ghz. They all run at about the same speed, which is slower than the P3 processor
ran at 1.2 GHZ.

Has anyone else seen this? Is there anything I can do about it?

Would a 3.0 GHZ P4 be able to catch up to the 1.2 Ghz based system?

Everything else is the same, except the memory on the P4 is also faster.

I hope someone has some answers. I need about 10 of these mother board/cpu combinations, but can't find a good supply of P3's or motherboards.

Is anyone familiar with the Pheonix Award Bios enough to know what can be done there to improve performance or who I should address this question to.

Tom Eldredge

Mark_Larson

Quote from: Tom Eldredge on March 22, 2005, 08:45:14 PM
Gentlemen,

A subscriber at the Power Basic windows forum suggested I post my question here because you folks are more intimately familiar with the internal workings of the CPU's. 

I am very puzzled. I need to upgrade to a newer (available) motherboard and CPU to run a DOS based compiled Power Basic 3.5 compiled program which does intensive outputs and inputs to a pci based dual parallel port and a lot of math.  I am trying to match the speed of an older Aopen Pentium III based motherboard with a new Aopen motherboard, which employs the Pheonix Award Bios 6.00 and an Intel P4 processor.   I choose to run under DOS because it is a real time operating system and this program runs a metal cutting machine.  The new motherboard with the P4 runs the program at a noticeably slower speed. I have also tried celeron cpu's running 2.4 ghz and 2.8 ghz. They all run at about the same speed, which is slower than the P3 processor
ran at 1.2 GHZ.

Has anyone else seen this? Is there anything I can do about it?

Would a 3.0 GHZ P4 be able to catch up to the 1.2 Ghz based system?

Everything else is the same, except the memory on the P4 is also faster.

I hope someone has some answers. I need about 10 of these mother board/cpu combinations, but can't find a good supply of P3's or motherboards.

Is anyone familiar with the Pheonix Award Bios enough to know what can be done there to improve performance or who I should address this question to.

Tom Eldredge


If I remember right ( and I might be mis-remembering), P4's run 16-bit code slower.  The testing I originally did under DOS had a 800 MHz PIII running faster in 16-bit DOS than a P4 1.4 GHz. 

You can try other OSes.  You can try adding support for 32-bit protected mode for your stuff.  You can try getting it to run under Windows, though accessing a PCI card will require a driver.  You can try to heavily optimize the code to make it run fast even on a P4 under DOS.
BIOS programmers do it fastest, hehe.  ;)

My Optimization webpage
htttp://www.website.masmforum.com/mark/index.htm

Tom Eldredge

Thank you for your response.  I decided to find a source for p3's and I think I found one good enough to last me this year.

Tom

hitchhikr

Ever heard about AMD ? Boards for their processors may be easier to find than p3's these days (and they're probably less expensive than the ones for p4).

MichaelW

Is the speed at which the code executes determined by processor and I/O performance or by a hardware timer (directly or indirectly)?

The attachment contains a program that times a 16-bit CRC procedure (that uses 8-bit and 16-bit registers). Running on a P3-500, the loop takes ~112 ticks to execute under Windows 2000, and ~115 ticks to execute running in real mode from a Windows 98 boot disk. I am going to be very surprised if a P4, any P4, cannot run it much faster.


[attachment deleted by admin]
eschew obfuscation

dioxin

Michael,
112 ticks? The code as posted runs in 9 or 10 ticks on my AthlonXP. Surely there can't be that much difference?


Tom,
if you need faster, try an AMD CPU, why are you intent on using P4 if it causes you problems?

Paul.

MichaelW

Quote from: dioxin on March 23, 2005, 01:13:15 AM
Michael,
112 ticks? The code as posted runs in 9 or 10 ticks on my AthlonXP. Surely there can't be that much difference?

I just tried again. Running the program directly from the archive under Windows 2000, I get 112 ticks. My processor is running at 503MHz, and I have 371,892 KB of available physical memory. And running it from the Windows 98 boot disk, I get 115 ticks. Running the program on a K5-112.5 (~PR166) I get 199 ticks under Windows XP HE, and 197 ticks from the Windows 98 boot disk, so perhaps the code contains something that is handicapping the P3.


eschew obfuscation

Mark Jones

"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

raymond

I have a little pet program (which includes a timer) which is very CPU intensive. I was very surprised when I tried it on a P4-1500 and it ran slower than on a P3-550! :(

It seems that the P4 architecture is such that some instructions are a lot slower than they were on a P3.

Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

Mark_Larson

Quote from: raymond on March 23, 2005, 03:33:59 AM
I have a little pet program (which includes a timer) which is very CPU intensive. I was very surprised when I tried it on a P4-1500 and it ran slower than on a P3-550! :(

It seems that the P4 architecture is such that some instructions are a lot slower than they were on a P3.

Raymond


  One of my huge pet peeves of the P4.  Unfortunately I know one of the guys who helped design it.  I make sure to give him lots of sh**.  He moved to Qualcomm recently. 

  Raymond this is under DOS?
BIOS programmers do it fastest, hehe.  ;)

My Optimization webpage
htttp://www.website.masmforum.com/mark/index.htm

raymond

QuoteRaymond this is under DOS?

I have a DOS and a Win32 version of it. It didn't matter whether I ran them under Win98, WinXP or in a DOS box. I don't think I tried it after booting in DOS on that P4.

The "Win32" version was prepared primarily to run it in a window with Win98 without the hassle of opening a DOS box and then having to reload Windows. The "computing" part of the code is not necessarily all based on 32-bit registers. A lot of it is based on 8-bit registers (BCDs).

Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com