Hallo Herr Bret Johnson, am Donnerstag, 9. März 2023 um 23:27 schrieben Sie:
> The computer I'm currently using is a few years old, old enough > that I can boot DOS on the actual hardware. The CPU is an Intel i5-4590 > running at 3.30 GHz. > I have a DOS program I wrote a long time ago, called SLOWDOWN (and > hope to find time to "update" it in the future). The purpose of > SLOWDOWN is to slow the computer down so that DOS applications don't > "blow up" because the computer is too fast. It's not a perfect > solution, but is useful in certain situations. > One of the things SLOWDOWN needs to do is figure out how fast the > computer is running so that it can slow it down the correct amount > when you want to do that. So, SLOWDOWN can sort of be used as a > "benchmark" to see how fast your computer actually is. > For my test, I compared how fast my current computer runs (with a > 3.30 GHz clock speed) against a 33 MHz 386 CPU (which I measured way > back when -- I don't have access to that computer any more). At > least in theory, because my current clock speed is 100 times as fast > as the 386, my current computer should run _at least_ 100 times as > fast as the 386 did. Also, at least in theory, it should be even > faster than that since the new computer has a cache and the 386 > didn't, modern CPU's take fewer clock cycles per CPU instruction, etc. > In fact, the new 3.3 GHz i5 CPU runs about 10 times faster than the > 33 MHz 386 did, not more than 100 times like you would expect. this doesn't make sense AT ALL. even in your own source, DB 'º Generic º AMD ³ AM386DX ³ 33 ³ 334 º',CR,LF DB 'º Unknown º Intel ³ Pentium-3 ³ 650 ³ 4611 º',CR,LF DB 'º Generic º AMD ³ K6-2 ³ 350 ³ 4780 º',CR,LF you document that an AMD k6-2 350 MHz is 15 times faster then a 33 MHz 386 CPU. And we all KNOW that an Intel i5-4590 running at 3.30 GHz is faster then AMD K6-2. for those who want to search themself, search the source for 'WasteLoop'. it all boils down to some garbage (does nothing sensible) code, including MOV CX,2 ;Do two bits REPE CMPSB ;Compare the string to itself ADD AL,220 ;Give AL a number ADD AX,3456 ;Give AX a number MOV BX,DummyVar ;BX=address of DummyVar MOV DummyVar,AX ;Store it in DummyVar SUB AX,ES:DummyVar ;AX=0 XLATB ;AL=[BX+(unsigned)AL] SAL BX,CL ;Multiply BX by 2, CL times MOV CL,3 ;Divide by 3 SAR DummyVar,CL ;Signed divide DummyVar by 2, 3 times SBB AX,8 ;Subtract with borrow AAM ;ASCII adjust after multiply (AL/10:AH=Quo,AL=Rem) DAS ;Decimal adjust after subtraction MOV DX,21h ;Do an IN AL,DX ; IN POP CX ;Restore the loop counter DEC CX ;Decrement it JZ WasteExit ;If it's 0, we're done JUMP WasteLoop ;If it's not, do it all again looks innocent enough. the problem child is IN AL,DX ; IN and the fact that the 'IN'-bus doesn't run significant faster then it did in 386's days (there is a reason modern disks are accessed with (U)DMA, not IN). the speed depends on the chipset and the actual port address, but is more like 10 MHz then 3 GHz. > I then ran a second test where I disabled the cache on the CPU (you > can do this with my CPUCACHE program which is included with > SLOWDOWN). This is a more "apples-to-apples" comparison of the > _actual_ CPU speed than the original test with the cache enabled. it's not. almost EVERYBODY knows that GHz CPU's just don't make sense without cache, because it is always waiting for the next instruction coming from memory. and memory access times are basically unchanged for the last 30 years at 60-100 ns. so a modern CPU without cache spends all the time waiting for CPU instructions coming from memory. > When I did this test, the computer ran almost exactly the same speed > as the 33 MHz 386 (it was about 3% faster, not 10,000% faster as > "logic" would dictate). the is exactly no "logic" in your argument. > There is something VERY wrong going on > here. I suspect you may not believe my results, but they are nonetheless > real. > Let me ask you a few questions. One of the things I said was that > the main reason modern CPU's seem so fast is because of "tricks" > like pipelining and caching, and read ahead caching, write back buffering, and more > and you seem to indicate that you don't > think that is true. no. that's true. > Would you even _consider_ running a modern OS > on a CPU with the cache disabled, when the actual, verifiable data > shows it would run about the same speed as in the 386 days? I'm not stupid. > The next set of questions relate again to what I mentioned > previously. What if modern CPU's were super high-speed 386-class > CPU's? That is, what if we applied modern fabrication techniques to > 386 era technology -- how fast would the CPU's actually be? Let's > assume we could fabricate a 3.3 GHz 386-class CPU. Do you think it > would be 10,000% faster than a 33 MHz 386? nope. unless you can bring 10,000% faster memory. else you need a cache. > I think it probably > would be -- I certainly think it would be WAY faster than my 3.3 GHz > i5. nope. Tom _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel