2 Replies - 530 Views - Last Post: 27 June 2012 - 03:13 AM

#1 adn258  Icon User is offline

  • D.I.C Addict

Reputation: 11
  • View blog
  • Posts: 755
  • Joined: 31-August 11

Is parallelism really faster?

Posted 27 June 2012 - 01:24 AM

I know that this depends on a lot of factors but as a general factor where there's a long operation that a computer needs to complelte I have read different stories. I'm also not quite getting the science of this. So there are cores in the cpu obviously if you use parallelism /multithreading in your app isn't that just dividing the total amount of the GHZ that the cpu can handle among the cores? This isn't gaining any GHZ though right? So technically if you have 2 cores or 8 cores or 1 core for that matter running a long operation in a program the computer with 8 cores if it as 1.68ghs and the computer with 2 cores if that has 1.68ghz wouldn't run any faster if you used parallelism/multithreading on the 8 core machine, and didn't use anything except normal coding on the one with 2 cores.

Then I've heard other stores which one is right? You're not gaining ghz speed by having more cores so all else equal technically on a long operation a duel code at 4GHZ would be better than a 16core at 2GHZ right? I'm confused.

Is This A Good Question/Topic? 0
  • +

Replies To: Is parallelism really faster?

#2 negligible  Icon User is offline

  • D.I.C Regular

Reputation: 62
  • View blog
  • Posts: 302
  • Joined: 02-December 10

Re: Is parallelism really faster?

Posted 27 June 2012 - 02:29 AM

Having multiple cores means you have to wait less time between each operation.

Think of the route to your CPU as a pipe of a fixed width and data must more through this queue in single file, one item and a time creating a queue.
So the data behind, must wait for the data in front to be processed before it's its turn.

Adding a second processor means that there are now two units which can perform the processing and there are two queues, so data can move through faster.

Also, most of the time when you have a "dual core" this doesn't mean you have two CPUs. It means you have "hyper-threading" multiple threads (pipes, in my analogy) going to a single processor.
Which increases the amount of queues, again, bringing about a performance gain although to a less amount as you don't have twice the processing power.

This is not a 50% increase due to limitations from other hardware, and the inability of a lot of software to utilise multi-core processing correctly. Especially with hyper-threading, as programs that aren't designed to work with it only see the pipes and treat it exactly the same as two CPUs (Which it isn't).

Also, GHz isn't a measurement of processor performance - a faster clock speed != faster CPU. Things like the CPU architecture make so much difference.


duel code at 4GHZ would be better than a 16core at 2GHZ right? I'm confused.
In this example the benefit the 16 core computer would have is it would perform this same operation in a similar speed, assumption as it depends on a lot, the real difference would be it wouldn't tax this system anywhere near as much.
So, for example, you could perform 8 operations simultaneously in the same time it would take for the dual-core to perform 1.

This post has been edited by negligible: 27 June 2012 - 10:54 AM

Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 5960
  • View blog
  • Posts: 23,238
  • Joined: 23-August 08

Re: Is parallelism really faster?

Posted 27 June 2012 - 03:13 AM

Moved to Software Development
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1