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,307 of 4,675   
   Robert Prins to Terje Mathisen   
   Re: Online generation of constants for "   
   16 Mar 18 10:56:12   
   
   From: robert@nospicedham.prino.org   
      
   On 2018-03-16 07:31, Terje Mathisen wrote:   
   > Robert Prins wrote:   
   >> OK, Mrs Prins wasn't too happy, but running the code 8 times for 2000   
   >> cycles of 400 years results in the following 8 differences in RDTSC:   
   >>   
   >> 7091411486   
   >> 7041873911   
   >> 7105815625   
   >> 7087706654   
   >> 7077261096   
   >> 7058243743   
   >> 7069882336   
   >> 7178577784   
   >>   
   >> Empty loop takes   
   >>   
   >> 1439083272   
   >>   
   >> and that results in an average time of only 24.26 cycles per loop and   
   >> 19.34 cycles per executed JC. Have I really beaten you?   
   >   
   > You have definitely come up with at least equal performance, my timing was   
   for   
   > the plain C version of the code instead of the hand-optimzied asm.   
      
   Virtual Pascal isn't really an optimizing compiler, and despite it having been   
   worked on for well over a decade longer, FreePascal wouldn't have done much   
   better, and next to that it has a raft of other issues.   
      
   I'm sure about any C compiler that's now in use would beat the crap out of   
   anything Pascal, just as people like you would probably still beat the crap out   
   of (some of) the code they generate. If you were to hand-optimize your code I   
   think it's quite likely that your code would be as fast, if not faster than   
   mine.   
      
   > The difference in performance between them is more or less trivial though.   
      
   And given that the routine is only called about 10,000 times in my program,   
   40,000-50,000 cycles more isn't too much of a problem. ;)   
      
   > Nice job with your code!   
      
   Thank you. :)   
      
   Robert   
   --   
   Robert AH Prins   
   robert(a)prino(d)org   
      
   --- 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