Commit 3372130
committed
Improved
refs https://github.com/nodejs/node-addon-api/blob/main/doc/object.md#set
- according to the node-addon-api docs, you can set various things as
the key for a Napi::Object, including a std::string ref
- instantiating a `Napi::String::New` is quite heavy, especially when
we're doing it for every row we return, so we can avoid doing that and
speed up the function
- locally, this speeds up the benchmark by 5-15% (a lot of variance) but YMMVRowToJS performance by removing Napi::String::New instantiation1 parent 77b327c commit 3372130
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
817 | | - | |
| 817 | + | |
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
| |||
0 commit comments