{"ScriptPreparationCode":"class Mat3_Consts extends Float32Array {\r\n constructor() {\r\n super(9);\r\n \r\n this[0] = Math.random();\r\n this[1] = Math.random();\r\n this[2] = Math.random();\r\n this[3] = Math.random();\r\n this[4] = Math.random();\r\n this[5] = Math.random();\r\n this[6] = Math.random();\r\n this[7] = Math.random();\r\n this[8] = Math.random();\r\n }\r\n\r\n mul(that) {\r\n const x1 = this[0];\r\n const x2 = this[1];\r\n const x3 = this[2];\r\n const y1 = this[3];\r\n const y2 = this[4];\r\n const y3 = this[5];\r\n const z1 = this[6];\r\n const z2 = this[7];\r\n const z3 = this[8];\r\n const a1 = that[0];\r\n const a2 = that[1];\r\n const a3 = that[2];\r\n const b1 = that[3];\r\n const b2 = that[4];\r\n const b3 = that[5];\r\n const c1 = that[6];\r\n const c2 = that[7];\r\n const c3 = that[8];\r\n\r\n this[0] = x1 * a1 \u002B x2 * b1 \u002B x3 * c1;\r\n this[1] = x1 * a2 \u002B x2 * b2 \u002B x3 * c2;\r\n this[2] = x1 * a3 \u002B x2 * b3 \u002B x3 * c3;\r\n this[3] = y1 * a1 \u002B y2 * b1 \u002B y3 * c1;\r\n this[4] = y1 * a2 \u002B y2 * b2 \u002B y3 * c2;\r\n this[5] = y1 * a3 \u002B y2 * b3 \u002B y3 * c3;\r\n this[6] = z1 * a1 \u002B z2 * b1 \u002B z3 * c1;\r\n this[7] = z1 * a2 \u002B z2 * b2 \u002B z3 * c2;\r\n this[8] = z1 * a3 \u002B z2 * b3 \u002B z3 * c3;\r\n return this;\r\n }\r\n}\r\n\r\nclass Mat3_ConstsArranged extends Float32Array {\r\n constructor() {\r\n super(9);\r\n \r\n this[0] = Math.random();\r\n this[1] = Math.random();\r\n this[2] = Math.random();\r\n this[3] = Math.random();\r\n this[4] = Math.random();\r\n this[5] = Math.random();\r\n this[6] = Math.random();\r\n this[7] = Math.random();\r\n this[8] = Math.random();\r\n }\r\n\r\n mul(that) {\r\n const x1 = this[0];\r\n const a1 = that[0];\r\n \r\n const x2 = this[1];\r\n const b1 = that[3];\r\n \r\n const x3 = this[2];\r\n const c1 = that[6];\r\n \r\n const y1 = this[3];\r\n const a2 = that[1];\r\n \r\n const y2 = this[4];\r\n const b2 = that[4];\r\n \r\n const y3 = this[5];\r\n const c2 = that[7];\r\n \r\n const z1 = this[6];\r\n const a3 = that[2];\r\n \r\n const z2 = this[7];\r\n const b3 = that[5];\r\n \r\n const z3 = this[8];\r\n const c3 = that[8];\r\n\r\n this[0] = x1 * a1 \u002B x2 * b1 \u002B x3 * c1;\r\n this[1] = x1 * a2 \u002B x2 * b2 \u002B x3 * c2;\r\n this[2] = x1 * a3 \u002B x2 * b3 \u002B x3 * c3;\r\n this[3] = y1 * a1 \u002B y2 * b1 \u002B y3 * c1;\r\n this[4] = y1 * a2 \u002B y2 * b2 \u002B y3 * c2;\r\n this[5] = y1 * a3 \u002B y2 * b3 \u002B y3 * c3;\r\n this[6] = z1 * a1 \u002B z2 * b1 \u002B z3 * c1;\r\n this[7] = z1 * a2 \u002B z2 * b2 \u002B z3 * c2;\r\n this[8] = z1 * a3 \u002B z2 * b3 \u002B z3 * c3;\r\n return this;\r\n }\r\n}\r\n\r\nclass Mat3_ConstsArranged2 extends Float32Array {\r\n constructor() {\r\n super(9);\r\n \r\n this[0] = Math.random();\r\n this[1] = Math.random();\r\n this[2] = Math.random();\r\n this[3] = Math.random();\r\n this[4] = Math.random();\r\n this[5] = Math.random();\r\n this[6] = Math.random();\r\n this[7] = Math.random();\r\n this[8] = Math.random();\r\n }\r\n\r\n mul(that) {\r\n const x1 = this[0];\r\n const a1 = that[0];\r\n const x2 = this[1];\r\n const b1 = that[3];\r\n const x3 = this[2];\r\n const c1 = that[6];\r\n this[0] = x1 * a1 \u002B x2 * b1 \u002B x3 * c1;\r\n \r\n const y1 = this[3];\r\n const a2 = that[1];\r\n const y2 = this[4];\r\n const b2 = that[4];\r\n const y3 = this[5];\r\n const c2 = that[7];\r\n this[4] = y1 * a2 \u002B y2 * b2 \u002B y3 * c2;\r\n \r\n const z1 = this[6];\r\n const a3 = that[2];\r\n const z2 = this[7];\r\n const b3 = that[5];\r\n const z3 = this[8];\r\n const c3 = that[8];\r\n this[8] = z1 * a3 \u002B z2 * b3 \u002B z3 * c3;\r\n\r\n this[1] = x1 * a2 \u002B x2 * b2 \u002B x3 * c2;\r\n this[2] = x1 * a3 \u002B x2 * b3 \u002B x3 * c3;\r\n this[3] = y1 * a1 \u002B y2 * b1 \u002B y3 * c1;\r\n this[5] = y1 * a3 \u002B y2 * b3 \u002B y3 * c3;\r\n this[6] = z1 * a1 \u002B z2 * b1 \u002B z3 * c1;\r\n this[7] = z1 * a2 \u002B z2 * b2 \u002B z3 * c2;\r\n return this;\r\n }\r\n}\r\n\r\nclass Mat3_ConstsArranged3 extends Float32Array {\r\n constructor() {\r\n super(9);\r\n \r\n this[0] = Math.random();\r\n this[1] = Math.random();\r\n this[2] = Math.random();\r\n this[3] = Math.random();\r\n this[4] = Math.random();\r\n this[5] = Math.random();\r\n this[6] = Math.random();\r\n this[7] = Math.random();\r\n this[8] = Math.random();\r\n }\r\n\r\n mul(that) {\r\n const x1 = this[0];\r\n const a1 = that[0];\r\n const x2 = this[1];\r\n const b1 = that[3];\r\n const x3 = this[2];\r\n const c1 = that[6];\r\n this[0] = x1 * a1 \u002B x2 * b1 \u002B x3 * c1;\r\n \r\n const y1 = this[3];\r\n const a2 = that[1];\r\n const y2 = this[4];\r\n const b2 = that[4];\r\n const y3 = this[5];\r\n const c2 = that[7];\r\n this[4] = y1 * a2 \u002B y2 * b2 \u002B y3 * c2;\r\n this[1] = x1 * a2 \u002B x2 * b2 \u002B x3 * c2;\r\n this[3] = y1 * a1 \u002B y2 * b1 \u002B y3 * c1;\r\n \r\n const z1 = this[6];\r\n const a3 = that[2];\r\n const z2 = this[7];\r\n const b3 = that[5];\r\n const z3 = this[8];\r\n const c3 = that[8];\r\n this[8] = z1 * a3 \u002B z2 * b3 \u002B z3 * c3;\r\n this[2] = x1 * a3 \u002B x2 * b3 \u002B x3 * c3;\r\n this[5] = y1 * a3 \u002B y2 * b3 \u002B y3 * c3;\r\n this[6] = z1 * a1 \u002B z2 * b1 \u002B z3 * c1;\r\n this[7] = z1 * a2 \u002B z2 * b2 \u002B z3 * c2;\r\n return this;\r\n }\r\n}\r\n\r\nclass Mat3_ConstsArranged4 extends Float32Array {\r\n constructor() {\r\n super(9);\r\n \r\n this[0] = Math.random();\r\n this[1] = Math.random();\r\n this[2] = Math.random();\r\n this[3] = Math.random();\r\n this[4] = Math.random();\r\n this[5] = Math.random();\r\n this[6] = Math.random();\r\n this[7] = Math.random();\r\n this[8] = Math.random();\r\n }\r\n\r\n mul(that) {\r\n const x1 = this[0];\r\n const x2 = this[1];\r\n const x3 = this[2];\r\n const a1 = that[0];\r\n const b1 = that[3];\r\n const c1 = that[6];\r\n this[0] = x1 * a1 \u002B x2 * b1 \u002B x3 * c1;\r\n \r\n const y1 = this[3];\r\n const y2 = this[4];\r\n const y3 = this[5];\r\n const a2 = that[1];\r\n const b2 = that[4];\r\n const c2 = that[7];\r\n this[4] = y1 * a2 \u002B y2 * b2 \u002B y3 * c2;\r\n this[1] = x1 * a2 \u002B x2 * b2 \u002B x3 * c2;\r\n this[3] = y1 * a1 \u002B y2 * b1 \u002B y3 * c1;\r\n \r\n const z1 = this[6];\r\n const z2 = this[7];\r\n const z3 = this[8];\r\n const a3 = that[2];\r\n const b3 = that[5];\r\n const c3 = that[8];\r\n this[8] = z1 * a3 \u002B z2 * b3 \u002B z3 * c3;\r\n this[2] = x1 * a3 \u002B x2 * b3 \u002B x3 * c3;\r\n this[5] = y1 * a3 \u002B y2 * b3 \u002B y3 * c3;\r\n this[6] = z1 * a1 \u002B z2 * b1 \u002B z3 * c1;\r\n this[7] = z1 * a2 \u002B z2 * b2 \u002B z3 * c2;\r\n return this;\r\n }\r\n}\r\n\r\nclass Mat3_ConstsArranged5 extends Float32Array {\r\n constructor() {\r\n super(9);\r\n \r\n this[0] = Math.random();\r\n this[1] = Math.random();\r\n this[2] = Math.random();\r\n this[3] = Math.random();\r\n this[4] = Math.random();\r\n this[5] = Math.random();\r\n this[6] = Math.random();\r\n this[7] = Math.random();\r\n this[8] = Math.random();\r\n }\r\n\r\n mul(that) {\r\n const x1 = this[0];\r\n const x2 = this[1];\r\n const x3 = this[2];\r\n const a1 = that[0];\r\n const b1 = that[3];\r\n const c1 = that[6];\r\n \r\n const y1 = this[3];\r\n const y2 = this[4];\r\n const y3 = this[5];\r\n const a2 = that[1];\r\n const b2 = that[4];\r\n const c2 = that[7];\r\n \r\n const z1 = this[6];\r\n const z2 = this[7];\r\n const z3 = this[8];\r\n const a3 = that[2];\r\n const b3 = that[5];\r\n const c3 = that[8];\r\n this[0] = x1 * a1 \u002B x2 * b1 \u002B x3 * c1;\r\n this[4] = y1 * a2 \u002B y2 * b2 \u002B y3 * c2;\r\n this[1] = x1 * a2 \u002B x2 * b2 \u002B x3 * c2;\r\n this[3] = y1 * a1 \u002B y2 * b1 \u002B y3 * c1;\r\n this[8] = z1 * a3 \u002B z2 * b3 \u002B z3 * c3;\r\n this[2] = x1 * a3 \u002B x2 * b3 \u002B x3 * c3;\r\n this[5] = y1 * a3 \u002B y2 * b3 \u002B y3 * c3;\r\n this[6] = z1 * a1 \u002B z2 * b1 \u002B z3 * c1;\r\n this[7] = z1 * a2 \u002B z2 * b2 \u002B z3 * c2;\r\n return this;\r\n }\r\n}\r\n\r\nclass Mat3_Accesses extends Float32Array {\r\n constructor() {\r\n super(9);\r\n \r\n this[0] = Math.random();\r\n this[1] = Math.random();\r\n this[2] = Math.random();\r\n this[3] = Math.random();\r\n this[4] = Math.random();\r\n this[5] = Math.random();\r\n this[6] = Math.random();\r\n this[7] = Math.random();\r\n this[8] = Math.random();\r\n }\r\n\r\n mul(that) {\r\n this[0] = this[0] * that[0] \u002B this[1] * that[3] \u002B this[2] * that[6];\r\n this[1] = this[0] * that[1] \u002B this[1] * that[4] \u002B this[2] * that[7];\r\n this[2] = this[0] * that[2] \u002B this[1] * that[5] \u002B this[2] * that[8];\r\n this[3] = this[3] * that[0] \u002B this[4] * that[3] \u002B this[5] * that[6];\r\n this[4] = this[3] * that[1] \u002B this[4] * that[4] \u002B this[5] * that[7];\r\n this[5] = this[3] * that[2] \u002B this[4] * that[5] \u002B this[5] * that[8];\r\n this[6] = this[6] * that[0] \u002B this[7] * that[3] \u002B this[8] * that[6];\r\n this[7] = this[6] * that[1] \u002B this[7] * that[4] \u002B this[8] * that[7];\r\n this[8] = this[6] * that[2] \u002B this[7] * that[5] \u002B this[8] * that[8];\r\n return this;\r\n }\r\n}\r\n\r\n\r\n\r\n\r\nvar MatA1 = new Mat3_Consts();\r\nvar MatA2 = new Mat3_Consts();\r\n\r\nvar MatB1 = new Mat3_ConstsArranged();\r\nvar MatB2 = new Mat3_ConstsArranged();\r\n\r\nvar MatC1 = new Mat3_Accesses();\r\nvar MatC2 = new Mat3_Accesses();\r\n\r\nvar MatD1 = new Mat3_ConstsArranged2();\r\nvar MatD2 = new Mat3_ConstsArranged2();\r\n\r\nvar MatE1 = new Mat3_ConstsArranged3();\r\nvar MatE2 = new Mat3_ConstsArranged3();\r\n\r\nvar MatF1 = new Mat3_ConstsArranged4();\r\nvar MatF2 = new Mat3_ConstsArranged4();\r\n\r\nvar MatG1 = new Mat3_ConstsArranged5();\r\nvar MatG2 = new Mat3_ConstsArranged5();","TestCases":[{"Name":"Store values in consts first","Code":"MatA1.mul(MatA2);","IsDeferred":false},{"Name":"Store values in consts first (arranged)","Code":"MatB1.mul(MatB2);","IsDeferred":false},{"Name":"Access values directly","Code":"MatC1.mul(MatC2);","IsDeferred":false},{"Name":"Store values in consts first (arranged2)","Code":"MatD1.mul(MatD2);","IsDeferred":false},{"Name":"Store values in consts first (arranged3)","Code":"MatE1.mul(MatE2);","IsDeferred":false},{"Name":"Store values in consts first (arranged4)","Code":"MatF1.mul(MatF2);","IsDeferred":false},{"Name":"Store values in consts first (arranged5)","Code":"MatG1.mul(MatG2);","IsDeferred":false}]}