Re: quick comments on Matrix

On Fri, Mar 15, 2013 at 7:46 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Sat, Mar 16, 2013 at 12:36 AM, Dirk Schulze <dschulze@adobe.com> wrote:
>
>> I guess what you suggest is that (x,y)^T = (0,1)^T is a rotation by 90
>> degree and (1,0)^T is a rotation by 0 degree? (Note that the rotation is
>> clockwise on SVG.) Maybe it is better to just specify the angle between
>> (1,0)^T and the vector given by x and y. The only special case would be
>> that both values are 0 (which could be defined to be a multiplication by
>> the identity transform == no affect).
>>
>
> Sure.
>
> There were similar discussions on webkit-dev mailing list[1].
>>
>
> That discussion has people arguing for floats but no-one defending
> doubles...
>
>
>> Usually 32bit maps better to the underlaying GPU. The difference is less
>> important on desktop CPUs. With standards like OpenCL 1.1 full and others,
>> GPUs are required to get better on double precision anyway. The decision
>> seems to be more if we want to optimize for current hardware or look at the
>> life time of the spec and assume that HW gets better. Changing the spec
>> later causes incompatibility later (even if the difference is very small).
>>  WebIDL does not support optional datatypes it seems. That means I needed
>> to choose between 64-bit and 32-bit. Upon on requests here on this list, it
>> seems that there are use cases for double precision beyond graphics for the
>> screen.
>>
>
> What are they?
>

I agree with where I think Rob is going. Matrix is most likely to be used
for graphics. Float32 is significantly faster (2x or 4x) than double on
desktop and probably even more on mobile. People wanting doubles can write
their own math library in JavaScript. There's no reason to put Matrix in at
all unless it's fast.


>
> Rob
> --
> Wrfhf pnyyrq gurz gbtrgure naq fnvq, “Lbh xabj gung gur ehyref bs gur
> Tragvyrf ybeq vg bire gurz, naq gurve uvtu bssvpvnyf rkrepvfr nhgubevgl
> bire gurz. Abg fb jvgu lbh. Vafgrnq, jubrire jnagf gb orpbzr terng nzbat
> lbh zhfg or lbhe freinag, naq jubrire jnagf gb or svefg zhfg or lbhe fynir
> — whfg nf gur Fba bs Zna qvq abg pbzr gb or freirq, ohg gb freir, naq gb
> tvir uvf yvsr nf n enafbz sbe znal.” [Znggurj 20:25-28]
>

Received on Saturday, 16 March 2013 05:11:25 UTC