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
DenoでもBunでもいいから 最速を目指す
Search
Yusuke Wada
September 05, 2022
Programming
2
1.5k
DenoでもBunでもいいから 最速を目指す
Yusuke Wada a.k.a yusukebe
2022/09/05 Node学園 40時限目
Yusuke Wada
September 05, 2022
Tweet
Share
More Decks by Yusuke Wada
See All by Yusuke Wada
Remix on Hono on Cloudflare Workers
yusukebe
1
280
僕がつくった48個のWebサービス達
yusukebe
20
17k
Honoの来た道とこれから
yusukebe
19
3.2k
JS RPCを理解する
yusukebe
5
680
Honoとhtmx
yusukebe
6
1.8k
Cloudflare Workersの環境を再現することについて
yusukebe
7
1k
Hono v4
yusukebe
11
4.8k
Hono v3 and v4
yusukebe
4
3.8k
The power of Web-standards
yusukebe
4
1.7k
Other Decks in Programming
See All in Programming
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
Click-free releases & the making of a CLI app
oheyadam
2
110
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
290
Better Code Design in PHP
afilina
PRO
0
120
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Outline View in SwiftUI
1024jp
1
320
Arm移行タイムアタック
qnighy
0
310
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Ethereum_.pdf
nekomatu
0
460
Featured
See All Featured
Code Review Best Practice
trishagee
64
17k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
What's new in Ruby 2.0
geeforr
343
31k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Making Projects Easy
brettharned
115
5.9k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Transcript
%FOPͰ#VOͰ͍͍͔Β ࠷Λࢦ͢ :VTVLF8BEBBLBZVTVLFCF /PEFֶԂ࣌ݶ
ࣗݾհ w :VTVLF8BEBBLBZVTVLFCF w ϘέͯDPGPVOEFS w :"1$"TJBϕεττʔΫड w גࣜձࣾτϥϕϧϒοΫ
εʔύʔόΠβʔ w UXJUUFSDPNZVTVLFCF w HJUIVCDPNZVTVLFCF /PEFֶԂॳࢀՃͰ͢
)POPͱ͍͏ϑϨʔϜϫʔΫΛ͍ͭͬͯ͘·͢ w 8FCϑϨʔϜϫʔΫɾϧʔλʔ w 8FC4UBOEBSE'FUDIͷ"1*ͷΈΛ༻ w ϚϧνϓϥοτϑΥʔϜ w $MPVE fl
BSF8PSLFSTɺ'BTUMZ$PNQVUF!&EHFɺ%FOPɺ#VO w ϛυϧΣΞͰػೳՃ w 5SJF3PVUFS EFGBVMU ͱ3FH&YQ3PVUFSͷͭͷϧʔλʔ͕͋Δ IUUQTIPOPKTEFW
)POPͷͭͷϧʔλʔ w 5SJF3PVUFS w 3FH&YQ3PVUFSCZ!VTVBMPNB w +4ͷΣϒϑϨʔϜϫʔΫͰߴͳϧʔλʔΛ࣮͢Δํ๏ 4QFBLFS%FDL w IUUQTTQFBLFSEFDLDPNVTVBMPNBVMUSBGBTUKTSPVUFS
6MUSBGBTU ͱʹ͔͍͘ϑϨʔϜϫʔΫΛࢦ͍ͯ͠Δ
%FOPɺ#VO w #VO w #VOJTBGBTUBMMJOPOF+BWB4DSJQUSVOUJNF IUUQTCVOTI w %FOP w
0VSHPBMJTUPNBLF%FOPUIFGBTUFTU+BWB4DSJQUSVOUJNF IUUQTEFOPDPNCMPHDIBOHFT )POPͲͪΒͰಈ͘ͷͰ %FOPͰ#VOͰͲ͜Ͱಈ͔͍͍͔ͯ͠Β Ұ൪͍ϑϨʔϜϫʔΫΛࢦͯ͠ΈΑ͏
8FCϑϨʔϜϫʔΫ͕͍ͱʁ
͍͍ͩͨ͜ͷͭΛଌΔ w )FMMP8PSME w ϧʔςΟϯά w 3FRVFTU3FTQPOTFͷॲཧ EFMWFEPSSPVUFSCFODINBSL 4BMUZ"PNCVOIUUQGSBNFXPSLCFODINBSL
طଘϕϯνϚʔΫPSΦϦδφϧ ͰଌͬͯΈΑ͏ .BD#PPL1SP.DPSF(#
%FOPɺ#VOͷલʹ/PEF
/PEFϧʔλʔฤ w EFMWFEPSSPVUFSCFODINBSL#FODINBSLPGUIFNPTUDPNNPOMZ VTFEIUUQSPVUFST IUUQTHJUIVCDPNEFMWFEPSSPVUFSCFODINBSL w /PEFͷओཁʮϧʔλʔʯͷϕϯνϚʔΫ w &YQSFTT
w LPBSPVUFS w LPBUSFFSPVUFS w fi OENZXBZ'BTUJGZͰΘΕ͍ͯΔ w USFLSPVUFS w FUD )POPͷݸΛ͋Θͤͯݸͷϧʔλʔ
Γํ ϧʔςΟϯάఆٛ ୟ͖ํ ͋͘·ͰϧʔςΟϯά 3FR3FTͷϋϯυϦϯά͠ͳ͍
݁Ռͦͷ Ґ Ґ
݁Ռ্Ґ Ґ Ґ Ґ
)POP Ґ Ґ ˎͪͳΈʹ)POPͷϧʔλʔෳͷϋϯυϥʹରԠͤͨ͞Γ ϓϥΠΦϦςΟ͕ෳࡶͩͬͨΓ͢Δ
ͪͳΈʹ#VOͩͱ
)POP3FH&YQ3PVUFS͕উͭ #VOͷਖ਼نදݱ͕͍ /PEFΑΓ͘ͳͬͯ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
#VO ,JOH8PSMEͬ Ͱ1PTU+40/ͦΜͳͰͳ͍ʁ
1PTU+40/ w BXBJUBTZODΛ͏ͱ,JOH8PSMEͷύϑΥʔϚϯεམͪΔ w (&5 ͳͲಉظత w )POP ࣌
શͯͷϋϯυϥͰBXBJU͢Δॲཧ͕ೖ͍ͬͯͨ BTZODϋϯυϥͷαϙʔτ BXBJU͢Δॲཧ͕શϋϯυϥʹରͯ͠ߦΘΕ͍ͯͨ 1PTU+40/
BXBJUΛ͏ͱ͍ IUUQTHJUIVCDPNPWFOTICVOJTTVFT
+BSSFEొ IUUQTHJUIVCDPNPWFOTICVOJTTVFTJTTVFDPNNFOU 5IFSFJTTUJMMNPSFXPSLUPCFEPOF UPSFEVDF#VOTQSPNJTFBXBJUPWFSIFBE
WͰվળ ͨͩ͠ ˎ5IFNPSFHFOFSBMDBTFPGBTZODBXBJUQFSGPSNBODFCFJOHXPSTFJO+4$UIBO7JTTUJMMBOJTTVF
#VODBOBSZ ݈ಆͯ͠Δ
+BSSFEͷΞυόΠε ˎW͕ग़ΔલͰ͕͢ʜ
ϋϯυϥ͕Ұͭͷ߹DPNQPTF͠ͳ͍Α͏ʹͨ͠ IUUQTHJUIVCDPNIPOPKTIPOPQVMM
ABXBJUAΛগͳͨ͘͠ IUUQTHJUIVCDPNIPOPKTIPOPQVMM
#VOWDBOBSZ )POP "dependencies": { "@kapson fi re/bun-bakery": "^0.3.2", "@nbit/bun":
"^0.7.0", "baojs": "^0.1.3", "bunrest": "^1.1.0", "colstonjs": "latest", "express": "^4.18.1", "hyperbun": "^0.4.6", "kingworld": "^0.0.0-experimental.24" } )POP͍ͧ
࠷৽൛ #VOWDBOBSZ )POPIUUQTHJUIVCDPNIPOPKTIPOPUSFF FCFCDDGEDGCC "dependencies": { "@kapson fi re/bun-bakery": "^0.3.2",
"express": "^4.18.1", "fastify": "^4.5.3", "hyperbun": "^0.4.6", "kingworld": "^0.0.0-experimental.24" },
࠷৽ͷ݁Ռ IUUQTHJUIVCDPNZVTVLFCFXFCGSBNFXPSLCFODI
ͱ͍͏͜ͱͰ%FOPͰ#VOͰ ϑϨʔϜϫʔΫͷதͰ ˚Ұ൪͍ ⦿ҰೋΛ૪͏
͍ͬͨΜײ w ύϑΥʔϚϯεΛͱΔ͔ϝϯςφϏϦςΟΛͱΔ͔ʁ w 6MUSBGBTUΛΞΠσϯςΟςΟʹͯ͠ΔͷͰͳΔ͘͘ w ػೳ͋ΔͷͰ࠷େม w ϕϯνϚʔΫʮͳ·ͷʯ w
ϕϯνϚʔΫ͍͠ w ڥɺϥϯλΠϜͷ࣮ w #VOͷϨεϙϯεϔομʹA%BUFAϔομ͕ͳ͍FUD w ఢΛ࡞ΔՄೳੑ͕͋Δ
%FOP্ͱ#VO্ͳΒͲͪΒ͕͍ͷ͔ʁ %FOP fl BTI͍ #VO৽͍͠)POPͩͱ͍
ࡢڭ͑ͯΒͬͨϕϯνϚʔΫαΠτ IUUQTEFOPWTCVO fl ZEFW %FOP fl BTIͬͯͳ͍
#VOͰ੩తϑΝΠϧͷαʔϒΛ࠷దԽ͠Α ͏ͱ͍ͯ͠Δ
#VOͬͱ͘ͳΔ
ͪͳΈʹ%&-&5&͚ͩ3FRVFTUͷத ͕ۭʹͳΔόά͕͋Δ IUUQTHJUIVCDPNPWFOTICVOJTTVFT IUUQTHJUIVCDPNIPOPKTIPOPJTTVFT
%FOP
·ͩ͘ͳΔ
63-͕͍
͏*TTVFʹͳͬͯͨ IUUQTHJUIVCDPNEFOPMBOEEFOPJTTVFT
63-͡Όͳͯ͘ 63-4FBSDI1BSBNT͚ͩͰΑ͘ͳ͍ʁ
DSFRRVFSZͷߴԽ IUUQTHJUIVCDPNIPOPKTIPOPQVMM
Ҏ্ύϑΥʔϚϯε্͕ͬͨ IUUQTHJTUHJUIVCDPNZVTVLFCFGFEGEFFDEGE
ߴԽͱϕϯνϚʔΫ ଓ͍͍ͯ͘ʜ