Skip to content

process.hrtime() is much slower in 14.x #36417

Closed
@spazmodius

Description

@spazmodius

process.hrtime() takes twice as long to execute in Node.js 14, compared to Node.js 12.

  • Version: 14.15.0 vs 12.18.4
  • Platform: Microsoft Windows NT 10.0.19041.0 x64
  • Subsystem: process

What steps will reproduce the bug?

Running benchmark/process/bench-hrtime.js in Node.js 12 and 14

> node -v
v12.18.4

> node bm\process\bench-hrtime.js
process\bench-hrtime.js type="raw" n=1000000: 19,672,995.469309144
process\bench-hrtime.js type="diff" n=1000000: 20,285,745.00412815
process\bench-hrtime.js type="bigint" n=1000000: 20,371,868.07993106
v14.15.0
        
> node bm\process\bench-hrtime.js
process\bench-hrtime.js type="raw" n=1000000: 9,509,147.32426858
process\bench-hrtime.js type="diff" n=1000000: 9,260,999.984256301
process\bench-hrtime.js type="bigint" n=1000000: 9,194,852.721446535

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions