~/talk

Binary in JavaScript

Talkat DotJS 2016 · 2016-12-02..12-05· [javascript, web-performance]
slides:none on file

Concrete savings and concrete techniques: a 512×512 game reduces memory from 16MB to 4MB by packing tile fields into a single integer, using bitwise masks and shifts. JavaScript numbers are IEEE floats but bitwise operators coerce to 32‑bit integers and truncate decimals; & and | mask bits, ~ flips all bits, << doubles, >> preserves sign, >>> zero‑fills. Also shows the XOR swap without a third variable and warns against clever hacks like >>>0 for parseInt in production.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.