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
tc39_study
Search
Daiki Ihara
October 09, 2019
Programming
770
1
Share
tc39_study
Temporal
BinaryAST
Daiki Ihara
October 09, 2019
More Decks by Daiki Ihara
See All by Daiki Ihara
ArrayBufferとBinary
sasurau4
1
650
CLIから見るAngular, React, Vue
sasurau4
1
970
Metro Bundler in Web
sasurau4
0
990
reading-mtc2018-web.pdf
sasurau4
1
560
Other Decks in Programming
See All in Programming
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
2
340
感情を設計する
ichimichi
5
1.5k
AIエージェントで業務改善してみた
taku271
0
520
[RubyKaigi 2026] Require Hooks
palkan
0
120
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
410
JOAI2026 1st solution - heron0519 -
heron0519
0
130
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
130
tRPCの概要と少しだけパフォーマンス
misoton665
2
180
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
190
의존성 주입과 모듈화
fornewid
0
130
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
450
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
330
Featured
See All Featured
Test your architecture with Archunit
thirion
1
2.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
WENDY [Excerpt]
tessaabrams
10
37k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
320
What's in a price? How to price your products and services
michaelherold
247
13k
Visualization
eitanlees
150
17k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
120
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
160
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
740
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