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

Re: [Public WebGL] comparing typed arrays





On Wed, Jun 6, 2012 at 3:53 PM, Glenn Maynard <glenn@zewt.org> wrote:
On Wed, Jun 6, 2012 at 2:13 PM, Kenneth Russell <kbr@google.com> wrote:

The intent in the typed array spec is minimality. Functionality is
only added when there are strong use cases.

Note that this doesn't necessarily have to be part of the typed arrays spec itself; secondary functionality can always be pushed to a separate spec, keeping the core spec minimal.  (That spec can either supplement the ArrayBufferView interface, or create a new namespace.)

(I agree that use cases should always be there before adding any new APIs, of course.  I'm just noting that typed arrays don't need *stronger* use cases than other specs.)

They're prototyping them to see whether they yield a speedup. If they
do, that's strong motivation for adding them.

(I suppose this will boil down to whether modern JIT can detect that a loop is a memcmp(), and convert it to an optimized version, though this does feel like a core operation that might make sense to provide anyway, for unity of code if not performance.)

BTW, discussion of typed arrays is welcome on this list, but you might
consider emailing public-webapps@w3.org for a broader audience.

It's much the same audience, but whatwg@whatwg.org might be a little better.  (WebApps is a chartered W3C WG with a set list of deliverables, and Typed Arrays isn't one of them.)

FWIW, I seem to recall this coming up on whatwg in the past, but I don't recall where.

For handling arbitrary encoded string terminators we discussed exposing memchr() on views (as an indexOf() method) over on whatwg. Any other mem* primitives that we should consider?