Faster JavaScript with Category Theory
summary
Claims that category theory yields concrete wins: mapping raw HTML-element functions into jQuery methods gives loop fusion, turning two jQuery loops into one and cutting overhead, measured roughly 10–15% speedup on common chains and up to 20% on string-parsing cases like removeAttr; an append escape hatch produces much larger gains in tight loops. Implements a small, modular AMD library (Wheeled) that exposes the underlying DOM manipulators, uses querySelector/Sizzle, lives on GitHub, and passes the jQuery test suite.
AI-written summary · about
chapters (32)
- 0:00Intro
- 1:00Personal Information
- 1:13John Bender
- 1:26Motivation
- 2:31Performance
- 2:53What is jQuery
- 3:19jQuery Internals
- 3:56jQuery Methods
- 5:15Category Theory
- 6:56Identity Law
- 7:12Composition Law
- 7:52HTML
- 9:24Identity
- 9:37Compose
- 11:36How does this work
- 12:20Example
- 13:15Functor
- 14:36Objects
- 16:28WHA
- 19:57Why you care
- 20:39Rewrapping
- 21:15Fusion
- 22:28Remove Attribute
- 23:51Simplify Manipulation
- 24:46Performance Benefit
- 25:00Caveat
- 25:46Escape Hatch
- 27:47GitHub
- 29:21Modular
- 29:42Radical modularity
- 29:57minification
- 30:20Category Theory jQuery
related talks
38mFaster jQuery With Category Theory
21mAsk not what JavaScript can do for you
38mPerf the web forward!
31mJavaScript Compilation Techniques or "Wasn't JavaScript supposed to be slow?"
09mState of jQuery - Part 2 - Sizzle
44mModern JavaScript: Moving Beyond jQuery
34mThe jQuery Divide
29mExtreme JavaScript Performance
