erkyrath / quixe

A Glulx VM interpreter written in Javascript
http://eblong.com/zarf/glulx/
MIT License
169 stars 33 forks source link

Switch over to JS typed arrays (Uint8Array, Uint32Array) #25

Open erkyrath opened 7 years ago

erkyrath commented 7 years ago

The last time I tested this, it wasn't any faster than regular JS arrays. However, that was many browser optimizations ago; it might be a good idea now.

We have seen problems with very large Blorb files (hundreds of megabytes), which can be represented in-memory as Node Buffers or Uint8Arrays, but not naive Number arrays.

curiousdannii commented 7 years ago

Probably easiest to use DataViews. I made an extension to DataView which also has support for getting and setting a block of data too.