Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
给 Node.js 插上 C++ 的翅膀
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ZHU, Kaidi
November 10, 2018
Programming
170
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
给 Node.js 插上 C++ 的翅膀
ZHU, Kaidi
November 10, 2018
Transcript
44 slides
给 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*+.%(/- " !
More Decks by ZHU, Kaidi
See All by ZHU, Kaidi
Remilia - Structure of Huaban Directional Pinning System
xadillax
0
69
Other Decks in Programming
See All in Programming
はじめてのPLATEAU
nokonoko1203
1
680
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
350
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
220
眠らない開発チームの作り方
biwakonbu
0
170
マルチプロダクトSaaSの アプリ一覧を速くする——複数プロダクトにまたがる「権限行脚」を減らすまで #techramen26conf
mktakuya
1
260
Distance field of Julia set
kinakomoti321
0
330
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
270
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
240
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
700
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
280
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
710
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
200
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
970
For a Future-Friendly Web
brad_frost
184
11k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
490
Marketing to machines
jonoalderson
1
6k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
790
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
3
180
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
850
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.3k