Expense of BUPC timer functions

From: Nikita Andreev (nik_at_kemsu.ru)
Date: Mon Mar 22 2010 - 23:55:09 PDT

  • Next message: Paul H. Hargrove: "Re: Expense of BUPC timer functions"
    Hello Paul and all,
    
     
    
    I'm measuring the overhead of bupc_ticks_now() and bupc_ticks_to_ns() and
    results doesn't look like I expected. Find the test attached.
    
     
    
    I've made 1 million iterations and have got the following:
    
    bupc_ticks_now: 2383ns
    
    bupc_ticks_to_ns: 4ns
    
     
    
    So the conversion is made lot faster than query. But documentation says: The
    bupc_ticks_to_{us,ns}() conversion calls can be significantly more expensive
    than the bupc_ticks_now() tick query.
    
     
    
    What I also noticed is that first bupc_tick_to_ns call in a loop is very
    slow. It can take even 1,5 milliseconds. And almost all others are very
    fast.
    
     
    
    What am I missing here?
    
     
    
    P.S. I've performed this test on a virtual machine if it makes any
    difference.
    
     
    
    Regards,
    
    Nikita Andreev
    
    
    
    
    
    


  • Next message: Paul H. Hargrove: "Re: Expense of BUPC timer functions"