Integers vs Numbers

Đang mở
#91 17 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
cpp, node.js
Lĩnh vực
api, performance

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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?

Ngôn ngữ chính
C++
Star
2.6k
Fork
602
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nodejs/node-addon-examples

Tất cả issue của nodejs/node-addon-examples

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.