Results 1 to 13 of 13

Thread: [RESOLVED] What is it with threads and performance?

Hybrid View

  1. #1
    Fanatic Member BlindSniper's Avatar
    Join Date
    Jan 2011
    Location
    South Africa
    Posts
    865

    Re: What is it with threads and performance?

    Well theoretically if you only had one processor doing them in linear or parallel would take Exactly the same time since the processor can only do X amount of calculations per second and you only have Y amount of calculations that need to be done. But if you have a dual or quad core processor theoretically it could be done faster because then you have true parallelism .

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    629

    Re: What is it with threads and performance?

    Ah so the fact that I have a dual-core processor could explain why it is faster when using threads? Then still...why is it like 10x as fast?

    EDIT

    BTW: I added a picturebox which was updating from the COPY bitmap (very buggy, took a while to make it work), and it is filling the empty pixels nicely parallel.
    The image looked sorta like this, dots stand for filled pixels:
    ..............-----------------
    ...........-------------------
    .........--------------------
    .......----------------------
    etc.
    Last edited by bergerkiller; Mar 10th, 2011 at 04:51 PM.

  3. #3
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: What is it with threads and performance?

    Quote Originally Posted by BlindSniper View Post
    Well theoretically if you only had one processor doing them in linear or parallel would take Exactly the same time since the processor can only do X amount of calculations per second and you only have Y amount of calculations that need to be done. But if you have a dual or quad core processor theoretically it could be done faster because then you have true parallelism .
    The key term here is "theoretically". Mutithreading requires slightly more overheads than single threading and thus with a single core/thread (non-hyper threading) CPU, it'll take longer to complete the same task when multithreaded.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width