[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 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?



fn:Mark Callow
org:HI Corporation;Graphics Lab, Research & Development
adr:Higashiyama 1-4-4, Meguro-ku;;Meguro Higashiyama Bldg 5F;Tokyo;;153-0043;Japan
title:Chief Architect
tel;work:+81 3 3710 9367 x228
tel;fax:+81 3 5773 8660
url:http://www.hicorp.co.jp,  http://www.mascotcapsule.com