home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,470 of 4,675   
   fizz buzz to Rod Pemberton   
   Re: Fast Fizz Buzz program   
   19 Jul 18 05:15:09   
   
   From: demon.adramelek@nospicedham.gmail.com   
      
   On Wednesday, July 18, 2018 at 3:24:53 PM UTC-5, Rod Pemberton wrote:   
      
   > My 3.2Ghz AMD Phenom II X2 555 dual-core processor is from 2009 which is   
   > well over a decade old.  Your C results are twice as slow on your   
   > laptop versus my machine, but the assembly is slightly faster for both   
   > your server and laptop.  How can that be?  ...  I don't know why there   
   > would be such a huge discrepancy for the C code, while your assembly is   
   > slightly faster.   
      
   I would consider time command output as relative, not absolute numbers. There   
   are   
   million factors that can affect it (for example, background processes can slow   
   system down). I know that it will show me different numbers depending on the   
   laptop's battery state (if laptop plugged in or not).   
      
   > Did you use -O2 for the C code? (gcc -Wall -ansi -pedantic -O2).   
      
   Yes.   
      
   > What C compiler are you using?  (GCC v. 4.7.2 here, 64-bit Linux)   
      
   Apple LLVM version 9.0.0 (clang-900.0.38)   
   Target: x86_64-apple-darwin17.0.0   
      
   > What processors are being used on your laptop and server?  I.e., are   
   > they a decade old like mine is or are they new and underpowered?   
      
   My laptop is 3.1 GHz Intel Core i7, my server is just a VPS, so I'm not sure   
   how accurate   
   it would be to measure its speed. Theoretically it's "Intel Broadwell   
   microarchitecture,   
   speed 2200 MHz (estimated)".   
      
   If we really want measure programs performance we should come up with some   
   better software, like OProfile (), but I   
   didn't find   
   any profiler which would run on both Linux and OS X.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca