[lkml]   [2004]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC, 2.6] a simple FIFO implementation

    > I did a similar test once for ppc that found that an increment followed by
    > a test (marked unlikely) was actually quicker in practice than modulo
    > arithmetic. The branch predictor got it right most of the time, so the
    > test was almost free.

    Yep x % y where y isnt constant could result in a divide which will blow
    away 60+ cycles on some ppc machines. You can do a whole lot in those 60
    cycles. Many memcpys for example :)

    We removed all modulo arithmetic in the e1000 driver (replaced it with
    if (x > y) x = 0) and managed to measure an improvement.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:06    [W:0.021 / U:0.160 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site