logoalt Hacker News

DonHopkinslast Friday at 2:57 PM1 replyview on HN

WASM can even do 32-bit integers, which JavaScript can't, so uses floats instead.


Replies

WorldMakerlast Friday at 4:54 PM

JS has had byte arrays like Int32Array for a while. The JS engines will try to optimize math done into them/with them as integer math rather than float math, but yeah you still can't use an integer directly outside of array math.