A Tale of TurboFan: Four years that changed V8 forever
Inlining
Escape Analysis and Scalar Replacement
Making WebAssembly even faster: Firefox's new streaming and tiering compiler
Streaming compilation : Tier 1(or baseline compiler) and Tier 2 compiler
New bottleneck: CPU - main thread
Caching .wasm file
The Cost Of JavaScript
Bottleneck = Network(transmission size) + CPU(parse time)
JavaScript Startup Bytecode Cache
Optimizing hash tables: hiding the hash code
private symbol을 사용 -> symbol lookup이 필요
Backing store를 사용 -> lookup이 필요없게 되었다. 성능 향상!
: empty, array, dictionary
Fast Properties in V8
Named properties vs Indexed properties
Hidden classes and Descriptor arrays
In-object, fast, slow
Explaining JavaScript VMs in JavaScript - Inline Cached
Must-Watch JavaScript
In The Loop
Tasks - Animation callbacks - Microtasks
Tasks: 한번에 하나만 실행
Animation callbacks: 실행 시점에 큐에 있는 것은 모두 실행(실행 중 추가된 콜백은 다음번에 실행)
Microtasks: 큐가 빌때까지 계속 실행(따라서, 무한히 실행하는 것에 주의 필요)
자바스크립트와 이벤트 루프
Tasks, microtasks, queues and schedules
How JavaScript Timers Work
setTimeout vs setInterval
setInterval : 큐에 이전 핸들러가 실행되지 못하고 남아 있으면 새로 추가하지 않는다.
Elements kinds in V8
small integer -> PACKED_SMI_ELEMENTS
floating-point number -> PACKED_DOUBLE_ELEMENTS
regular element(string) -> PACKED_ELEMENTS
from PACKED to HOLEY
Avoid creating holes
Avoid reading beyond the length of the array
Avoid elements kind transitions
Prefer arrays over array-like objects
Avoid polymorphism
Bubbling and capturing
A cartoon guide to Flux
2018년 1월 23일 화요일
2018년 1월 16일 화요일
Kotlin 스터디
KotlinConf 2017
* Introduction to Coroutines *
https://resources.jetbrains.com/storage/products/kotlinconf2017/slides/2017+KotlinConf+-+Introduction+to+Coroutines.pdf
- Synchronous
- Asynchronous
-> Callback
- Futures/Promises/Rx
-> returns promise for a future result immediately
- Coroutines
-> suspend: returns result when received
-> like regular code
- Coroutines are like very light-weight threads
http://github.com/kotlin/kotlinx-coroutines
* Deep Dive into Coroutines on JVM *
https://resources.jetbrains.com/storage/products/kotlinconf2017/slides/2017+KotlinConf+-+Deep+dive+into+Coroutines+on+JVM.pdf
- Continuation Passing Style(CPS)
-> Callback
- State Machine
- Communicating Sequential Processes(CSP)
* Kotlin Types: Exposed *
Int vs Int?
IntArray vs Array<Int>
Any vs Object
Boxing under the hood vs No boxing
Unit vs Nothing vs void
Unit
-> a type that allows only one value and thus can hold no information
-> the function completes successfully
Nothing :
-> a type that has no values
-> It means "this function never returns"
- Unit과 Nothing은 Kotlin에서 위와 같은 차이가 있지만 JVM에서 똑같이 void로 컴파일된다.
Nothing?
@Nullable -> Type? and @NotNull(@NonNull) -> Type
How to still prevent NPEs? - 자바 코드를 코틀린에서 사용하는 경우 문제가 발생
-> Annotate your Java types
compileKotlin {
kotlinOptions {
freeCompilerArgs += "-Xjsr305=strict"
}
}
-> Specify types explicitly
Collections
-> Read-only : it is not immutable
-> Mutable
* Generating Kotlin Code *
KotlinPoet
A Functional Approach to Android Architecture using Kotlin
- Modeling Error and Success Cases
-- Result wrapper(Error or Success)
-- RxJava
-- KATEGORY
- Asynchronous Code and Threading
-- Java : ThreadPoolExecutor + exceptions + callbacks
-- RxJava : Schedulers + observable + error subscription
-- KATEGORY
Lazy evaluation
- Dependency Injection
-- Reader Monad: ReaderT, Monad Transformers
Exploring Kotlin's hidden costs - Part 1
Coroutine Theory
- Normal function
Call/Return
activation frame(stack)
- Coroutine
Suspend/Resume/Destroy
coroutine frame(heap) and stack frame
Kotlin Coroutines on Android: Things Wish I Knew at the Beginning
- Executor를 CoroutineDispatchers로 바꿀 수 있다.
- RxJava의 disposable 같은 것을 위해 "root" coroutine parent를 사용할 수 있다.
- CommonPool 의 크기를 조절할 수 있다.
- Async에서의 exception은 바로 발생되지 않는다.
- coroutine들을 협력적으로 cancel 하려면 CoroutineContext를 통한 parent-child 관계가 필요하다.
Async code using Kotlin Coroutines
RxJava to Kotlin coroutines
코루틴과 관련해서 Continuation에 대해서도 알면 좋을것 같다.
What's in a Continuation
Implementing a Stepping Debugger in JavaScript
Exploring Continuations: Resumable Exceptions
* Introduction to Coroutines *
https://resources.jetbrains.com/storage/products/kotlinconf2017/slides/2017+KotlinConf+-+Introduction+to+Coroutines.pdf
- Synchronous
- Asynchronous
-> Callback
- Futures/Promises/Rx
-> returns promise for a future result immediately
- Coroutines
-> suspend: returns result when received
-> like regular code
- Coroutines are like very light-weight threads
http://github.com/kotlin/kotlinx-coroutines
* Deep Dive into Coroutines on JVM *
https://resources.jetbrains.com/storage/products/kotlinconf2017/slides/2017+KotlinConf+-+Deep+dive+into+Coroutines+on+JVM.pdf
- Continuation Passing Style(CPS)
-> Callback
- State Machine
- Communicating Sequential Processes(CSP)
* Kotlin Types: Exposed *
Int vs Int?
IntArray vs Array<Int>
Any vs Object
Boxing under the hood vs No boxing
Unit vs Nothing vs void
Unit
-> a type that allows only one value and thus can hold no information
-> the function completes successfully
Nothing :
-> a type that has no values
-> It means "this function never returns"
- Unit과 Nothing은 Kotlin에서 위와 같은 차이가 있지만 JVM에서 똑같이 void로 컴파일된다.
Nothing?
@Nullable -> Type? and @NotNull(@NonNull) -> Type
How to still prevent NPEs? - 자바 코드를 코틀린에서 사용하는 경우 문제가 발생
-> Annotate your Java types
compileKotlin {
kotlinOptions {
freeCompilerArgs += "-Xjsr305=strict"
}
}
-> Specify types explicitly
Collections
-> Read-only : it is not immutable
-> Mutable
* Generating Kotlin Code *
KotlinPoet
A Functional Approach to Android Architecture using Kotlin
- Modeling Error and Success Cases
-- Result wrapper(Error or Success)
-- RxJava
-- KATEGORY
- Asynchronous Code and Threading
-- Java : ThreadPoolExecutor + exceptions + callbacks
-- RxJava : Schedulers + observable + error subscription
-- KATEGORY
Lazy evaluation
- Dependency Injection
-- Reader Monad: ReaderT, Monad Transformers
Exploring Kotlin's hidden costs - Part 1
Coroutine Theory
- Normal function
Call/Return
activation frame(stack)
- Coroutine
Suspend/Resume/Destroy
coroutine frame(heap) and stack frame
Kotlin Coroutines on Android: Things Wish I Knew at the Beginning
- Executor를 CoroutineDispatchers로 바꿀 수 있다.
- RxJava의 disposable 같은 것을 위해 "root" coroutine parent를 사용할 수 있다.
- CommonPool 의 크기를 조절할 수 있다.
- Async에서의 exception은 바로 발생되지 않는다.
- coroutine들을 협력적으로 cancel 하려면 CoroutineContext를 통한 parent-child 관계가 필요하다.
Async code using Kotlin Coroutines
RxJava to Kotlin coroutines
코루틴과 관련해서 Continuation에 대해서도 알면 좋을것 같다.
What's in a Continuation
Implementing a Stepping Debugger in JavaScript
Exploring Continuations: Resumable Exceptions
2018년 1월 11일 목요일
Swift 스터디 - Sequence, Pointer types
Conditional Conformance in the Standard Library
Equatable Containers
Collection Protocols
Swift의 Sequence와 Collection에 대해 알아야 하는것들
https://academy.realm.io/kr/posts/nate-cook-tryswift-tokyo-unsafe-swift-and-pointer-types/
https://academy.realm.io/posts/mobilization-roy-marmelstein-objective-c-runtime-swift-dynamic/
Type-Safe File Paths with Phantom Types
Equatable Containers
Collection Protocols
Swift의 Sequence와 Collection에 대해 알아야 하는것들
https://academy.realm.io/kr/posts/nate-cook-tryswift-tokyo-unsafe-swift-and-pointer-types/
https://academy.realm.io/posts/mobilization-roy-marmelstein-objective-c-runtime-swift-dynamic/
Type-Safe File Paths with Phantom Types
Rust 스터디
https://cfsamson.gitbook.io/green-threads-explained-in-200-lines-of-rust/
Zero-cost futures in Rust
Designing futures for Rust
https://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html
https://blog.rust-lang.org/2015/05/11/traits.html
http://huonw.github.io/blog/2015/05/finding-closure-in-rust/
https://alschwalm.com/blog/static/2017/03/07/exploring-dynamic-dispatch-in-rust/
http://huonw.github.io/blog/2015/01/peeking-inside-trait-objects/
Zero-cost futures in Rust
Designing futures for Rust
https://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html
https://blog.rust-lang.org/2015/05/11/traits.html
http://huonw.github.io/blog/2015/05/finding-closure-in-rust/
https://alschwalm.com/blog/static/2017/03/07/exploring-dynamic-dispatch-in-rust/
http://huonw.github.io/blog/2015/01/peeking-inside-trait-objects/
2018년 1월 10일 수요일
안드로이드 스터디
The Dex File Format
.java -> .class -> .dex
ART: Ahead-of-Time and Just-in-Time
D8, R8
Sinking Your Teeth Into Bytecode
sources + libraries -> compilers -> transforms -> d8 -> *.dex -> ART(Interperter, JIT, AOT) -> Machine code
- 리스트에 비디오 플레이 넣기
한번에 하나만 플레이 하도록 하기 위해 리스트 아이템 사이에 정보 전달이 필요하다.
https://medium.com/@v.danylo/implementing-video-playback-in-a-scrolled-list-listview-recyclerview-d04bc2148429
- RecyclerView는 어떻게 구현되어 있을까?
RecyclerView ins and outs - Google I/O 2016
http://blog.naver.com/PostList.nhn?from=postList&blogId=mail1001&categoryNo=14¤tPage=4
It's time to ditch Loaders in Android
Loader는 이제 그만.
Architecture Components를 사용하자.
.java -> .class -> .dex
ART: Ahead-of-Time and Just-in-Time
D8, R8
Sinking Your Teeth Into Bytecode
sources + libraries -> compilers -> transforms -> d8 -> *.dex -> ART(Interperter, JIT, AOT) -> Machine code
- 리스트에 비디오 플레이 넣기
한번에 하나만 플레이 하도록 하기 위해 리스트 아이템 사이에 정보 전달이 필요하다.
https://medium.com/@v.danylo/implementing-video-playback-in-a-scrolled-list-listview-recyclerview-d04bc2148429
- RecyclerView는 어떻게 구현되어 있을까?
RecyclerView ins and outs - Google I/O 2016
http://blog.naver.com/PostList.nhn?from=postList&blogId=mail1001&categoryNo=14¤tPage=4
It's time to ditch Loaders in Android
Loader는 이제 그만.
Architecture Components를 사용하자.
2018년 1월 4일 목요일
안드로이드 스터디 - UI
Playing with Paths
- Cartesian coordinates vs polat coordinates
- Path, CornerPathEffect, DashPathEffect
https://gist.github.com/nickbutcher/b41da75b8b1fc115171af86c63796c5b#file-polygonlapsdrawable-kt
Understanding Android Adaptive Icons
Designing Adaptive Icons
Implementing Adaptive Icons
VectorDrawable Adaptive Icons
- What is WindowInsets?
Becoming a master window fitter
Spantastic text styling with Spans
SpannedString
SpannableString
SpannableStringBuilder
Appearance Affecting Spans vs Metric Affecting Spans
Character Affecting Spans vs Paragraph Affecting Spans
CharacterStyle
ParagraphStyle
UpdateAppearance
UpdateLayout
피드 구독하기:
글 (Atom)
Building asynchronous views in SwiftUI 정리
Handling loading states within SwiftUI views self loading views View model 사용하기 Combine을 사용한 AnyPublisher Making SwiftUI views refreshable r...