8000 The clock_gettime execution time is not 500ns · Issue #84 · dendibakh/perf-book · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
The clock_gettime execution time is not 500ns #84
Open
@ujos

Description

@ujos

In the book page 34 there is a sentence:

Making a clock_gettime system call can be much slower than executing RDTSC
The latter takes about 5ns while the former takes about 500ns.

high_resolution_clock is not that expensive:

  • On my laptop with 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz CPU and Ubuntu 22.04 it takes 12ns.
  • On the AMD EPYC 9274F 24-Core CPU RH9 it takes 20ns
  • On the Intel(R) Xeon(R) Gold 5318Y CPU RH9 it takes 23ns

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0