Unverified Commit 54e1f0c2 authored by Brian White's avatar Brian White Committed by Italo A. Casas
Browse files

process: improve memoryUsage() performance

Creating an object in JS and using a typed array to transfer values
from C++ to JS is faster than creating an object and setting
properties in C++.

The included benchmark shows ~34% increase in performance with this
change.

PR-URL: https://github.com/nodejs/node/pull/11497


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarJeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent 842ac583
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment