Trivial arithmetic operation in a loop is very slow in IE10 - by marcus256

Status : 

  External<br /><br />
		This item may be valid but belongs to an external system out of the direct control of this product team.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

ID 804281 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 10/2/2013 1:27:39 AM
Access Restriction Public


The trivial arithmetic operations (add, madd, div) in the Web Array Math API benchmark are extremely slow.

For example, a core loop that looks like this (x, y, dst are Float32Arrays):

for (var k = Math.min(dst.length, x.length, y.length) - 1; k >= 0; --k)
        dst[k] = x[k] + y[k]; about 10x slower than a similar loop that contains Math.sqrt() instead of addition.

I suspect that the arithmetic operation or typed array accesses are slow-cased for some reason, or maybe the loop does not get any JIT love at all?
Sign in to post a comment.
Posted by Microsoft on 4/4/2016 at 9:40 AM
We've moved! This issue is now being tracked at
Posted by Microsoft on 10/14/2013 at 6:29 AM
Thanks for the heads up on the performance issue.

Unfortunately, we are not able to address this feedback in our upcoming release. We will consider your feedback for a future release. We will keep this connect feedback bug active to track this request.

Every piece of feedback we receive is important to us and helps us improve the quality of Internet Explorer.
We continue to welcome more feedback, so please don't hesitate to report other ways that we can improve Internet Explorer.

Best regards,
The Internet Explorer Beta Team
Posted by Microsoft on 10/3/2013 at 11:34 AM
Thank you for your feedback. We will be investigating this issue further.

Best regards,

The Internet Explorer Team
Posted by marcus256 on 10/2/2013 at 1:31 AM
For the impatient, here's the benchmark output:

(warming up...)
fill: 442ms (371Ms/s)
ramp: 1673ms (98Ms/s)
add: 38803ms (4Ms/s)
madd: 40072ms (4Ms/s)
div: 39358ms (4Ms/s)
round: 4215ms (39Ms/s)
abs: 2909ms (56Ms/s)
sign: 877ms (187Ms/s)
sqrt: 3152ms (52Ms/s)
max: 430ms (381Ms/s)
clamp: 1072ms (153Ms/s)
random: 7050ms (23Ms/s)
sin: 4685ms (35Ms/s)
sampleLinear: 6028ms (27Ms/s)
filter(1st order IIR): 3235ms (51Ms/s)
filter(biquad): 3332ms (49Ms/s)
filter(50-tab FIR): 51852ms (3Ms/s)
FFT(256): 23904ms (7Ms/s)
FFT(2048): 34309ms (5Ms/s)
Total: 239544ms