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

Re: [Public WebGL] Differing TypedArray#set behavior

On Thursday 12 April 2012 at 23:15, Oliver Hunt wrote:

> Oh, so this is just direct aliasing for fun and slowness? Hmmm, I wonder why it's failing then.

Well, I wonder how useful a copy method would be at all, if it didn't guarantee memmove-like behavior. You don't use memcpy unless you know the regions don't overlap, but we all want to avoid leaving that kind of memory management to user JS code.

I was more surprised mixing type was allowed like this, and I suppose it's because it also accepts a plain Array. If it weren't for that, everyone would simply be calling memmove().

At the same time, that's a useful addition, and logically extends into accepting anything arrayish including other types of TypedArray.

Stéphan Kochen

Two Screen, Angry Bytes

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