首页 > 编程语言 > 详细

Need For Speed: Nodejs Module In C++

时间:2021-04-06 15:14:03      阅读:14      评论:0      收藏:0      [点我收藏+]

转:

Need For Speed: Nodejs Module In C++

Introduction

The reason can‘t be more simple: the need for speed.

According to a simple test between node-uuid and C++ uuid, the truth was told: C++ is faster.

The time consumptions of 1M generations of uuid is almost 3s(node-uuid) vs. 0.3s(C++ modules based on boost uuid).

So, the advices is: crucial module should be written in C++, if you have time for this.

node-uuid Module in C++

node-uuid.h

#ifndef NODE_UUID_H
#define NODE_UUID_H

using namespace v8;

#define NODE_UUID_CLS_NAME "nodeUuid"

namespace igame
{
  namespace uuid {
    void initialize(Handle

Need For Speed: Nodejs Module In C++

原文:https://www.cnblogs.com/wangtcc/p/14621373.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!