Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
给 Node.js 插上 C++ 的翅膀
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ZHU, Kaidi
November 10, 2018
Programming
1
160
给 Node.js 插上 C++ 的翅膀
ZHU, Kaidi
November 10, 2018
Tweet
Share
More Decks by ZHU, Kaidi
See All by ZHU, Kaidi
Remilia - Structure of Huaban Directional Pinning System
xadillax
0
52
Other Decks in Programming
See All in Programming
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
140
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.5k
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
730
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
140
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
Raku Raku Notion 20260128
hareyakayuruyaka
0
350
今から始めるClaude Code超入門
448jp
8
9k
Oxlintはいいぞ
yug1224
5
1.4k
AI & Enginnering
codelynx
0
120
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
310
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
260
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
A better future with KSS
kneath
240
18k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
KATA
mclloyd
PRO
34
15k
Docker and Python
trallard
47
3.7k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
Google's AI Overviews - The New Search
badams
0
910
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
Tell your own story through comics
letsgokoyo
1
810
Transcript
给 NodC.js 插上 CNN 的翅膀
自我介绍 Ø C + Ø N Ø + + +
+ .+ Ø +
一个故事 .
Ø Ø
HH的 PHP 子进程方案 Node.js 进程 PHP 子进程 ONS SDK 启
动 ONS 收 / 发 收 / 发
N多脏? 宝宝只想做一个安静的 Node.js 项目
自己动手, 丰衣足食。 + .
1本 知其然,知其所以然。
动态链接库
如何 require The process.dlopen() method allows to dynamically load shared
objects. It is primarily used by require() to load C++ Addons, and should not be used directly, except in special cases. In other words, require() should be preferred over process.dlopen(), unless there are specific reasons.
都是 C++,与 NodC.js 原 N函数的区 别 +
2时 东风不与周郎便,铜雀春深锁二乔。
回到故事
性能: NBoBy &#
&)#(" "" + %) %)!$ , ((%' #"& '" (" %' # #( #"& '" %&$&"# #$* ("!
注意: 入不敷出 Ø . Ø + 8 I Ø C
N C O I
3法 万法归一,一归何处。
3.1. 环境
2 +- - .
3.2. 瞥
3.3. ChromC V8 I EC H
句柄 HHandle) v8::Local v8::Persistent v8::Eternal
句柄作用域(HandleScHpe) +< G$NH;:3LMG5VO G(H/ 7<R L =06VQ'.O</1H$N% !/7*GVC9 L2TJ E
• K< G • P< G G6" =H,)#=UH< G BA D-@>(4HLIEH$NH5VR %$N =UH G IEV+=U GF8H5VO?5S(H$N& L 2
. + C
常用数据类型
A header file filled with macro and utility goodness for
making add-on development for Node.js easier across versions 0.8, 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10. 3.4. NAN
CityHasC
3.5. libuv—— 事件循环与异步 • • • •
句柄(Handle)与请求(RequeHt) EF2<??@2D( EF2:3>6<72D( EF2D5@2D(0-/
EF2E6@2D(1./ EF2D;=7B2D( EF23CG>52D( ' # & <;4EF "! % <;4EF ,,, $ EF2B7A2D($ EF297D366B;>8?2D( EF297D366B;>8?)* EF25?>>75D2D( EF2<;CD7>)* H
没什么卵用的睡眠排序
同步原语 C / - / / - / / /
B /
睡眠排序 + 同步原语之互斥锁
ONC 中 Consume S程与事O循环S程N互
ONS 中的 Ack 类
4跳 旋转、跳跃,我不停歇。
DGE——E个老掉牙的 2D 游HG擎
EodG.Hs DGE DGmo
DemD 的样例
5猫 白猫黑猫,抓老鼠就是好猫。
N-APA
N-APA
AebAssembly
ARA64-EACAE82
ARA64-EACAE82
6结 看桃花,开出怎样的结果
FIN # $,'+)+%1,)&'.0*+.%(/- " !