node/test/addons-napi/2_function_arguments
Jason Ginchereau af70c3b478 n-api: optimize number API performance
- Add separate APIs for creating different kinds of numbers,
   because creating a V8 number value from an integer is faster
   than creating one from a double.
 - When getting number values, avoid getting the current context
   because the context will not actually be used and is expensive
   to obtain.
 - When creating values, don't use v8::TryCatch (NAPI_PREAMBLE),
   because these functions have no possibility of executing JS code.

Refs: https://github.com/nodejs/node/issues/14379
PR-URL: https://github.com/nodejs/node/pull/14573
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-07 17:31:17 -07:00
..
binding.c n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
binding.gyp n-api: add support for abi stable module API 2017-04-03 10:31:25 +02:00
test.js n-api: add support for abi stable module API 2017-04-03 10:31:25 +02:00