Welcome, Guest. Please login or register.

Author Topic: newb questions, hit the hardware or not?  (Read 63571 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Leffmann

  • Full Member
  • ***
  • Join Date: Feb 2011
  • Posts: 119
    • Show all replies
Re: newb questions, hit the hardware or not?
« on: July 17, 2014, 06:31:53 PM »
Quote from: Thorham;769218
I'll stick with assembly language on my A1200, because it's one of my computer related hobbies, and I'm certainly not going to have some bloated ego tell me it's a waste of time.


That's a bit over the top :) he's perfectly merited to be this assertive, and he is right in what he says - there are no gains to be gotten from withering away doing micro-optimizations on parts that have little or no bearing on the performance of the program.

Quote from: commodorejohn;769226
That's not how math works. 5% at 3GHz is 150,000,000 cycles per second of execution; saving a few dozen here and there is indeed pretty much irrelevant. 5% at 25MHz is 1,250,000 cycles per second - also pretty hefty, but depending on how many iterations of whatever code you're optimizing are running in that time, cycle-shaving can still make a bit of a difference. But at 7MHz? That's but 350,000 cycles - on a system where even basic instructions can take 8-20ish cycles to complete, that can get frittered away a lot faster than you'd think.


He's not trying to teach you maths, he's just stating the simple fact that if you for some inexplicable reason choose to optimize a part of your code that accounts for 5% of your execution time, then you can never get more than a 5% performance gain.