Integers vs Numbers

オープン
#91 コメント 17 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cpp, node.js
領域
api, performance

調査の方向性

No files or tests are named. Start by reviewing the N-API number-creation interface and the issue's discussion about V8 integer versus double performance; done requires a clear decision on whether integer creation or an integer hint is supported and what API change or documentation would be needed.

索引モデルが issue の本文から書いたものです。

説明

Even if javascript makes no difference, V8 can distinguish integers from double for performance reason (looping with a double is a huge loss because the looping variable can't be a cpu register).
I could create numbers that are integers in C++ but now, with N-API, I see no way to create integers, but just doubles.
Isn't this a performance problem?
Is there any way to hint the API to use integers instead?

主要言語
C++
スター
2.6k
フォーク
602
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nodejs/node-addon-examples のほかの issue

nodejs/node-addon-examples の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。