[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Typed Array setter for partial arrays (and typed array performance)

On Thu, Apr 21, 2011 at 11:28 PM, Mark Callow <callow_mark@hicorp.co.jp> wrote:
> On 22/04/2011 11:50, Kenneth Russell wrote:
>> On Thu, Apr 21, 2011 at 7:41 PM, Mark Callow <callow_mark@hicorp.co.jp> wrote:
>>> On 22/04/2011 07:25, Kenneth Russell wrote:
>>>> ... However, in an optimizing JavaScript VM, writing the associated
>>>> JavaScript code to do these sorts of operations will be faster than
>>>> adding another built-in, because in the former case the JIT has a
>>>> chance to generate specialized code, and in the latter case you're
>>>> calling in to and out of the VM's runtime system (typically written in
>>>> C++) which can't perform the same sorts of optimizations.
>>> But doesn't each typedarray[x] = y in the Javascript code require
>>> calling into and out of the VM's runtime system?
>> Not necessarily. As one example, in the V8 virtual machine, the JIT
>> has recently been made aware of the typed array types, so specialized
>> assembly code is generated for the assignment operator which is
>> extremely efficient.
> Interesting. If the JIT is so wonderful why do we need any API except
> the ArrayBuffer & typed array constructors and the DataView class?

That's my point exactly. (I realize your reply is tongue in cheek, but
mine isn't, really.)

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl