Measure the cost of calling a non-inlined function.
| 467 | |
| 468 | // Measure the cost of calling a non-inlined function. |
| 469 | double functionCall() |
| 470 | { |
| 471 | int count = 1000000; |
| 472 | uint64_t x = 0; |
| 473 | uint64_t start = Cycles::rdtsc(); |
| 474 | for (int i = 0; i < count; i++) { |
| 475 | PerfHelper::plusOne(x); |
| 476 | } |
| 477 | uint64_t stop = Cycles::rdtsc(); |
| 478 | |
| 479 | discard(&count); |
| 480 | return Cycles::toSeconds(stop - start)/(count); |
| 481 | } |
| 482 | |
| 483 | double functionDereference() |
| 484 | { |