Skip to content

Commit

Permalink
test: add quat.fromMat4 to benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnsgn committed May 10, 2023
1 parent 68456d7 commit e44d324
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion benchmark/bench-gl-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,13 @@ bench("quat.fromMat3", (b) => {
run(() => quat.fromMat3(q, m));
b.end();
});
// bench("quat.fromMat4", (b) => {});
bench("quat.fromMat4", (b) => {
const q = quat.create();
const m = mat4.create();
b.start();
run(() => mat4.getRotation(q, m));
b.end();
});
bench("quat.fromTo", (b) => {
const q = quat.create();
const v = vec3.create();
Expand Down
14 changes: 7 additions & 7 deletions benchmark/bench-pex.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,14 @@ bench("quat.fromMat3", (b) => {
run(() => quat.fromMat3(q, m));
b.end();
});
// bench("quat.fromMat4", (b) => {
// const q = quat.create();
// const m = mat4.create();
bench("quat.fromMat4", (b) => {
const q = quat.create();
const m = mat4.create();

// b.start();
// run(() => quat.fromMat4(q, m));
// b.end();
// });
b.start();
run(() => quat.fromMat4(q, m));
b.end();
});
bench("quat.fromTo", (b) => {
const q = quat.create();
const v = vec3.create();
Expand Down

0 comments on commit e44d324

Please sign in to comment.