> I couldn't find any fast access defined in the JIT compiler There are fast paths for typed arrays inside V8, they are just not called typed arrays :-) Look for "external arrays" instead.
For them V8 has both specialized IC stubs (e.g. load stub: https://github.com/v8/v8/blob/master/src/ia32/stub-cache-ia32.cc#L3508 ) and support in optimizing compiler pipeline (see IR instructions: LoadExternalArrayPointer, LoadKeyedSpecializedArrayElement, StoreKeyedSpecializedArrayElement). I always use typed arrays when they are available (this communicates my intent both to the JIT compiler and to a person reading my code). -- Vyacheslav Egorov On Sat, Jun 16, 2012 at 5:44 PM, Pablo Sole <pablo.s...@gmail.com> wrote: > Hello there, > > I'm embedding v8 into a binary instrumentation framework and I'm trying > to use an ArrayBuffer/TypedBuffer for fast memory operations (like > Tamarin/ActionScript does for the Memory object operations), but I > couldn't find any fast access defined in the JIT compiler, so I suppose > that a read/write to a TypedBuffer goes all the way of an object and > property resolution. Although, for this case it could just be a range > check and a memory load/store operation. > > So, would it be faster to use a regular array of SMIs (SMIs in the > indexes and in the values) without holes faster than an ArrayBuffer? Is > there any plan to provide a fast path for this case? > > Thanks, > > pablo. > > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users