Skip to content

transformMat3 optimization #94

@nrshvch

Description

@nrshvch

As described in this little article in russian ( http://algolist.manual.ru/graphics/3dfaq/articles/73.php ), vector rotation with matrix usually is done in 9 multiplications and 6 additions and it's the way it's done in vec3.transformMat3 method, but this can be done in 6 mul and 12 adds.
Addition operation is much cheapen than mul.
Here's jsperf tests, which show slight advantage of proposed optimization. Not a big deal though.
http://jsperf.com/mul-vs-add2

Here's translated article.
http://translate.google.com/translate?sl=auto&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Falgolist.manual.ru%2Fgraphics%2F3dfaq%2Farticles%2F73.php&act=url

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions