[Public WebGL] Differing TypedArray#set behavior

Stéphan Kochen [email protected]
Thu Apr 12 23:53:55 PDT 2012


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 [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------





More information about the public_webgl mailing list