pipelining in C++

Discussion in 'C Programming' started by abruzzoforteegentile, Nov 12, 2009.

  1. abruzzoforteegentile

    abruzzoforteegentile

    Joined:
    Oct 9, 2009
    Messages:
    9
    * Hi All
    I read a lot of times that pipelining is a good trick to optimize and speed up your code.

    I alway read basically to perform operations instead of this way

    Operation_1_a;
    Operation_2_a;
    Operation_3_a;

    Operation_1_b;
    Operation_2_b;
    Operation_3_b;

    Operation_1_C;
    Operation_2_C;
    Operation_3_C;


    I 'd better to do this

    Operation_1_a;Operation_1_b;Operation_1_c;
    Operation_2_a;Operation_2_b;Operation_2_c;
    Operation_3_a;Operation_3_b;Operation_3_c;

    where I can profit of the code that is already in the cache.

    Do you have a sample code where I can better see this concept already in practice or some hint?

    My guess that the real precondition for this technique is that Operation_1, Operation_2 and Operation_3 must be totally uncorrelated each other i.e. the result of one must not depend on the call of the previous function so no shared state or sharing variables.
    Am I right?
    Mn
    abruzzoforteegentile, Nov 12, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. koko

    Pipelining in VHDL

    koko, Apr 29, 2004, in forum: VHDL
    Replies:
    2
    Views:
    5,613
    mizocom
    Apr 29, 2004
  2. Peggy
    Replies:
    0
    Views:
    618
    Peggy
    Sep 8, 2004
  3. tulip

    pipelining

    tulip, Nov 5, 2004, in forum: VHDL
    Replies:
    0
    Views:
    609
    tulip
    Nov 5, 2004
  4. Andrea Campi

    Pipelining tutorial wanted

    Andrea Campi, Nov 14, 2004, in forum: VHDL
    Replies:
    9
    Views:
    2,165
    Mike Treseler
    Nov 19, 2004
  5. Divyang M
    Replies:
    3
    Views:
    585
    David Bishop
    Feb 4, 2005
Loading...

Share This Page