BitlystBitlyst
PostsSeriesTopicsAbout

Bitlyst

Short, diagram-first posts on JavaScript, React & Next.js. Follow via RSS or the newsletter.

© 2026 Mohsen Fallahnejad

PostsSeriesTopicsLinksAboutRSSGitHubX
← All series

Series

Under the Benchmark

Same code, wildly different speed. Measured explanations of what the engine and hardware are really doing.

Your guide: Tick. Doesn't believe a number until it has run seven times.

5 of 5 parts published · 29 min total

0/5 read
Start reading: Part 1 →
  1. 11,000 Cards, 1,000 Layouts, and requestAnimationFrame Didn't HelpWhat layout thrashing and forced reflow are, why reading offsetWidth after a style change is so slow, and how batching reads and writes fixes it.
    Nov 6, 20265 min read
  2. 2A Fifth Object Shape Made the Same Loop Twice as SlowHow V8 hidden classes and inline caches work, why property reads jump in cost past four object shapes, and how to keep hot code monomorphic.
    Nov 6, 20266 min read
  3. 34 KB of Text Was Holding 200 MB of MemoryWhy slice() in V8 can keep a huge parent string alive, how sliced strings cause memory leaks in Node.js, and how to copy a string to release it.
    Nov 6, 20265 min read
  4. 4Shuffling an Array Made the Same Loop Seven Times SlowerHow memory locality and CPU cache misses affect JavaScript: why array order changes loop speed for large arrays of objects, and when typed arrays help.
    Nov 6, 20266 min read
  5. 5Keeping Ten Times More Objects Made Garbage Collection Four Times CheaperHow V8's generational garbage collector really charges you: scavenges cost per survivor, and allocation site pretenuring can make long-lived objects cheaper.
    Nov 6, 20267 min read