0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/addons-napi
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
..
1_hello_world n-api: change napi_callback to return napi_value 2017-04-10 23:30:03 +02:00
2_function_arguments n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
3_callbacks n-api: napi_get_cb_info should fill array 2017-05-09 15:12:15 -04:00
4_object_factory n-api: change napi_callback to return napi_value 2017-04-10 23:30:03 +02:00
5_function_factory n-api: change napi_callback to return napi_value 2017-04-10 23:30:03 +02:00
6_object_wrap n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
7_factory_wrap n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
8_passing_wrapped n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_array n-api: add napi_delete_element() 2017-06-30 17:08:51 -04:00
test_async n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_buffer n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_constructor n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_conversions n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_dataview n-api: add support for DataView 2017-07-27 02:30:05 +02:00
test_env_sharing n-api: re-use napi_env between modules 2017-07-27 07:55:48 +08:00
test_error n-api: add code parameter to error helpers 2017-07-13 15:05:19 -04:00
test_exception test: add common.mustCall() to NAPI exception test 2017-05-13 16:49:24 -07:00
test_fatal test: adjust indentation for stricter linting 2017-07-27 09:24:20 -07:00
test_function n-api: napi_get_cb_info should fill array 2017-05-09 15:12:15 -04:00
test_general n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_handle_scope n-api: avoid crash in napi_escape_scope() 2017-06-21 16:57:39 -04:00
test_make_callback test: port test for make_callback to n-api 2017-05-06 12:24:43 -04:00
test_make_callback_recurse lib,src: fix consistent spacing inside braces 2017-07-21 15:13:47 -04:00
test_number n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_object n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_properties n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_reference n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_string n-api: optimize number API performance 2017-08-07 17:31:17 -07:00
test_symbol n-api: change napi_callback to return napi_value 2017-04-10 23:30:03 +02:00
test_typedarray n-api: add code parameter to error helpers 2017-07-13 15:05:19 -04:00
.gitignore
common.h n-api: add code parameter to error helpers 2017-07-13 15:05:19 -04:00
testcfg.py