Perf the web forward!
summary
Concrete, actionable fixes and measured wins: use createCallback hoists .call out of loops to make the no-context common case a straight call, use function source detection to avoid bind when a callback never references this, replace repeated indexOf searches with a hybrid object/array cache cuts large-array threshold to 75 (previously ~200) for big wins, and prefer deferred evaluation for long chains so iteration drops to the few final items. Benchmarks use jsperf / benchmark.js and jQuery event iteration shows ~18% improvement with these tweaks.
AI-written summary · about
chapters (8)
- 0:00Intro
- 0:21Perf The Web Forward
- 4:27Hoist call & apply
- 9:51Avoid binding
- 14:12Reduce searches
- 19:35Coerce with Care
- 23:00Sugar in moderation
- 26:53John-David Dalton
related talks
21mAsk not what JavaScript can do for you
29mExtreme JavaScript Performance
46m10 secrets to improve Javascript Performance
24mYou Did What? Understanding Node.js Optimizations
40mPerformance Patterns
31mJavaScript Compilation Techniques or "Wasn't JavaScript supposed to be slow?"
31mThe Need for Speed (aka Angular Performance).
28mOptimizations You Should Have Implemented Yesterday
