typed array strawman proposal

P T Withington ptw at pobox.com
Wed Jan 27 09:32:51 PST 2010

On 2010-01-27, at 12:17, Brendan Eich wrote:

> On Jan 27, 2010, at 8:16 AM, Peter van der Zee wrote:
>> new ArrayMapping(arrBuf, intBits, intStart, intFinish);
> The WebGL use-case cannot tolerate scaling by a variable "intBits" element width. It wants constant (compile-time) element size.

Really?  In these days of the JIT-compiler, when is compile-time?  I'd rather see a simple interface like the above, or like Lisp's displaced arrays, and just know that if I pick "normal" byte-sizes and offsets that I'm likely to trigger an optimization that turns my indirect array access into just a few hardware instructions (just a load if I am lucky, otherwise load/shift/mask).

More information about the es-discuss mailing list