[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] JavaScript matrix libraries really 5x faster in Minefield than Chrome?
- To: Stephen Bannasch <stephen.bannasch@deanbrook.org>
- Subject: Re: [Public WebGL] JavaScript matrix libraries really 5x faster in Minefield than Chrome?
- From: "Gregg Tavares (wrk)" <gman@google.com>
- Date: Mon, 14 Feb 2011 10:39:30 -0800
- Cc: public webgl <public_webgl@khronos.org>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1297708771; bh=8r9dTylsV7iMzyXgNIjbdxc/rnk=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=f9OGwq67gRiunKnod15mpFjqidVapHalLcl3ojNt7e/WhSacQyFbgy7tPwYyuYIQh eZiWGvoC4SG/cRo619zFw==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=SbLlx66jBpGzvW4+Mv/ILGznR+Nk4Hvi6KaIAEkFQoc=; b=Rz6TUG5eT8yiQfM5CS9322qdoRKiIhidA/SRa1Rv61OdQN3k8X19FwRarMepAsb7ki HEk3p202FAD70VqUc7kg==
- Domainkey-signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=nd2+Ebv4u1uzANHCZ0nGfArwS2Y7sNqSytIklH5ZdnT6+CUxGo20/s8//TjSwCbz7O I6v+jTCZpfCxdvYZyKeg==
- In-reply-to: <p0624080bc97f213071c3@192.168.1.122>
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- References: <p06240801c97e5f49fffb@63.138.152.169> <AANLkTikcok0qqLZ1KODQsAhM=5o2Z+zPy9HQauqaRU2b@mail.gmail.com> <AANLkTinHEvVYcYfcP9FmoVvF4vzM3kLEVNG8MLGnJ5jS@mail.gmail.com> <p0624080bc97f213071c3@192.168.1.122>
- Sender: owner-public_webgl@khronos.org
So I went looking as to why certain functions where faster in other libraries than the one I use. Not that I expect the one I use to be the fastest but I'm happy to optimize it. But, here's another example of apples vs oranges.
The CanvasMatrix library transposes matrices in place. That means it only has to swap 6 pairs of values.
The TDL math library always creates a new matrix
So, the question is which is faster? Well, that depends on usage. If I need both the transpose and the untransposed matrices then in CanvasMatrix library I'll also need to copy the matrix. In other words in pseudo code..
tdl:
transposedMatrix = transpose(originalMatrix);
CanvasMatrix:
transposedMatrix = new CanvasMatrix(originalMatrix);
transposedMatrix.transpose();
How do you compare those 2 libraries? They meet different usage styles?