Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
tc39_study
Search
Daiki Ihara
October 09, 2019
Programming
1
760
tc39_study
Temporal
BinaryAST
Daiki Ihara
October 09, 2019
Tweet
Share
More Decks by Daiki Ihara
See All by Daiki Ihara
ArrayBufferとBinary
sasurau4
1
620
CLIから見るAngular, React, Vue
sasurau4
1
950
Metro Bundler in Web
sasurau4
0
970
reading-mtc2018-web.pdf
sasurau4
1
560
Other Decks in Programming
See All in Programming
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
240
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
2
670
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.8k
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
2.8k
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
260
認証・認可の基本を学ぼう後編
kouyuume
0
180
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
210
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
200
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
1k
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
dnx で実行できるコマンド、作ってみました
tomohisa
0
140
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
140
Featured
See All Featured
Building Adaptive Systems
keathley
44
2.9k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Raft: Consensus for Rubyists
vanstee
141
7.2k
The Invisible Side of Design
smashingmag
302
51k
[SF Ruby Conf 2025] Rails X
palkan
0
500
Building Applications with DynamoDB
mza
96
6.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Optimizing for Happiness
mojombo
379
70k
Producing Creativity
orderedlist
PRO
348
40k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Six Lessons from altMBA
skipperchong
29
4.1k
Transcript
tc39_study https://github.com/sasurau4/slides
ABOUT ME { "id": "sasurau4", "name": "Daiki Ihara", "description": "Front-end engineer at CureApp, Inc.", "techs": { "work": ["React Native", "TypeScript", "JavaScript", "MongoDB"], "subwork": ["React Native", "React", "TypeScript"], "hobby": ["React", "TypeScript", "JavaScript", "Deno"] },
"homepage": "https://sasurau4.github.io/profile/" }
What is temporal? Provides standard objects and functions for working with dates and times. This proposal is currently stage 2.
Motivation Fixing JavaScript Date java.util.Date― その悲劇と歴史
Principles All temporal APIs are non-mutating. All temporal objects are effectively immutable. All date values are based on the Proleptic Gregorian Calendar. All time-of-day values are based on a standard 24-hour clock. Leap seconds are not represented.
Specification The documentation is out of date.
Try it with polyfill node --experimental-modules --no-warnings --icu-data-dir ./node_modules/full-icu/ -r ./lib/initialise.js For more details, https://github.com/tc39/proposal-temporal/tree/main/docs
Results > const day = Temporal.Date(2019, 1, 1) undefined > day.day 1 > day.toString() '2019-01-01'
> let d1 = Temporal.DateTime(2019, 2, 1) undefined > d1.toLocaleString() '2019/2/1 0:00:00' > d1.daysInMonth 28 > let onem = Temporal.Duration(0, 1) undefined > onem.toString() 'P1M'
What is binaryAST? Startup performance degrades with larger JS payloads, even if only a fraction of the code is actually executed. Parsing time is a significant component, taking more CPU time than bytecode / initial JIT code generation. For example, on a powerful laptop, Chrome spends 10% to 15% of CPU time parsing JS while loading facebook.com. We propose a new over-the-wire format for JS that is a binary encoding of an AST. We believe this new format would allow for drastically faster parsing. Moreover, web developers are well positioned to adopt a new format as they have embraced build tooling.
Motivation from https://blog.cloudflare.com/binary-ast/
prototype of binAST from https://github.com/binast/binjs-ref As websites become more sophisticated, the amount of JavaScript source code keeps increasing. While depending upon a large JavaScript codebase won't prevent a website from working, it will cause websites to start slowly – often unacceptably slow. This is due to two bottlenecks: parsing and bytecode compiling JavaScript. Unfortunately, browsers have pretty much reached efficiency peak for both operations. We (Mozilla, Bloomberg, Facebook,
CloudFlare) are currently working on a domain-specific encoding for JavaScript, called "BinAST" (short for "JavaScript Binary AST"). The JavaScript Binary AST is designed to break the bottleneck.
Result
Details https://blog.cloudflare.com/binary-ast/
Demo Try it with Firefox nightly! https://serve-binjs.that-test.site
The End